mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@efd47e3 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9188) PaperMC/Paper@1edfefd Add option to flush region files on save (#9149) PaperMC/Paper@9daa019 Added wither vanilla invulnerability API (#9124)
24 lines
1.1 KiB
Diff
24 lines
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: BillyGalbreath <blake.galbreath@gmail.com>
|
|
Date: Sat, 9 Jul 2022 00:57:32 -0500
|
|
Subject: [PATCH] Add local difficulty api
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
index 8d3a32a0538a6065fd0725721ab8a1a011c4d64a..c7bf0b4036877745d54908048f92735143c92210 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
@@ -2249,6 +2249,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
|
return (this.getHandle().dragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().dragonFight());
|
|
}
|
|
|
|
+ // Purpur start
|
|
+ public float getLocalDifficultyAt(Location location) {
|
|
+ return getHandle().getCurrentDifficultyAt(io.papermc.paper.util.MCUtil.toBlockPosition(location)).getEffectiveDifficulty();
|
|
+ }
|
|
+ // Purpur end
|
|
+
|
|
@Override
|
|
public PersistentDataContainer getPersistentDataContainer() {
|
|
return this.persistentDataContainer;
|