mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
drop two config options in favor of PurpurExtras impl
dropped options: - `mobs.snow_golem.drop-pumpkin-when-sheared` - `mobs.sheep.jeb-shear-random-color`
This commit is contained in:
23
patches/server/0260-Add-local-difficulty-api.patch
Normal file
23
patches/server/0260-Add-local-difficulty-api.patch
Normal file
@@ -0,0 +1,23 @@
|
||||
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 38d842bc0fb7d9c39a3673983a643248e9563fe2..8af705619e8a784c6128d7ff4838eeae56e59821 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -2415,6 +2415,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
return (this.getHandle().getDragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().getDragonFight());
|
||||
}
|
||||
|
||||
+ // 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;
|
||||
Reference in New Issue
Block a user