Files
Purpur/patches/api/0041-Add-local-difficulty-api.patch
granny 4f12f5d3d0 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@4d111a3 Un-experimentalize Entity TP APIs (#9964)
PaperMC/Paper@2182d47 Update mapping-io (#9975)
PaperMC/Paper@9993eb9 Updates documentation in EntityEquipment.java (#9992)
PaperMC/Paper@2184fbc Log correct recipes and advancement count on server start (#9978)
PaperMC/Paper@8bda1f7 Remove unnecessary durability check in ItemStack#isSimilar (#9979)
PaperMC/Paper@977a729 [ci skip] Correct Windows requiring path to gradlew (#9976)
PaperMC/Paper@3766afa [ci skip] Add mention of FQ imports (#9994)
PaperMC/Paper@40872ec Fix CraftMetaItem#addAttributeModifier duplication check (#9995)
PaperMC/Paper@ffa4115 Configurable Dry and Wet Farmland Tick Rates (#9968)
PaperMC/Paper@37bee09 Restore vanilla entity drops behavior (#7650)
PaperMC/Paper@5cbd535 Fix Mushroom cow stew api (#9934)
PaperMC/Paper@8e061ce Add Structure check API (#9062)
PaperMC/Paper@9271ee7 Dont resend blocks on interactions (#9413)
PaperMC/Paper@931781c [ci skip] rebuild patches
2023-12-06 16:18:27 -08:00

28 lines
1003 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <blake.galbreath@gmail.com>
Date: Sat, 9 Jul 2022 00:57:26 -0500
Subject: [PATCH] Add local difficulty api
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 567a36a4887da8994c9170e2885aa8cc357efa0c..26fe07a4429e40da1ce4a0433ae184f594ddb473 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -4235,6 +4235,16 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@Nullable
public DragonBattle getEnderDragonBattle();
+ // Purpur start
+ /**
+ * Gets the local difficulty (based on inhabited time) at a location
+ *
+ * @param location Location to check
+ * @return The local difficulty
+ */
+ public float getLocalDifficultyAt(@NotNull Location location);
+ // Purpur end
+
/**
* Get all {@link FeatureFlag} enabled in this world.
*