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

Paper Changes:
PaperMC/Paper@848a396 Add mob goal generator (#9980)
PaperMC/Paper@ebf97bd [ci skip] Add more patch identifying comments
PaperMC/Paper@94807a1 [ci skip] Minor cleanup and patch merges
2024-01-16 15:36:02 -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 bf4b94ea2577e9d7e344385209fc0644a4e6bfbb..8368b34d071f4f2c687e753ae52de4c03e3ac9f9 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -4172,6 +4172,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.
*