mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@1845cec Fix death message containing empty string (#8656) PaperMC/Paper@326a65e [ci skip] add missing final newline (#8659) PaperMC/Paper@0148283 Fix locateNearestBiome nullability check (#8662) PaperMC/Paper@3822cc8 Update paperweight to 1.4.0 PaperMC/Paper@adb8e49 Fix fire charge not being consumed igniting a creeper (#8652)
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 f8d321e925bf2708e51590542325c1bdc67d5964..fcc6ac180a74daffa173866be3dd97a3ad63ebd7 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
@@ -2237,6 +2237,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;
|