mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@3c8a7fe Re-add missing chunk event calls (#11104) PaperMC/Paper@a8db527 Even more cleanup of mcutil patch PaperMC/Paper@d08e8d1 Add total time to done message (#11109)
This commit is contained in:
23
patches/server/0249-Add-local-difficulty-api.patch
Normal file
23
patches/server/0249-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 362ca138a5cd5ad19f1300015c2571794adc3649..e771af8e79f0a89bc88d3c573b062dc7321fb36b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -2338,6 +2338,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 Collection<GeneratedStructure> getStructures(int x, int z) {
|
||||
return this.getStructures(x, z, struct -> true);
|
||||
Reference in New Issue
Block a user