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

Paper Changes:
PaperMC/Paper@489bff9 Temp fix for serialisable blockdata
PaperMC/Paper@90fe0d5 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9825)
PaperMC/Paper@c1ac983 Fix log level of advancement debug message (#9860)
2023-10-25 03:06:12 -07: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 91eb95b04094394e8dc1e3a3343efc63690c87e4..381cd0296ece416876e136d2ca710c18c3e8bea0 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -4072,6 +4072,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.
*