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

Paper Changes:
PaperMC/Paper@1cda66e Hotfix Entity isInRain reobf issue
PaperMC/Paper@61768e0 [ci skip] Remove no longer needed mappings change
PaperMC/Paper@e035fd7 Updated Upstream (Bukkit/CraftBukkit/Spigot)
PaperMC/Paper@c215ce1 [ci skip] cleanup patch diff from last commit
2023-12-25 18:45:01 -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 d3081d4445af73c2c7b23c5fc60861f184ac808e..1173081896ca95ab001175ddf6e269ab5e791896 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -4174,6 +4174,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.
*