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@b561a12 Fix SuspiciousStewMeta PaperMC/Paper@9624451 Add missing kick event cause PaperMC/Paper@6be4395 Migrate paper log ips option to new server.properties option PaperMC/Paper@2ec643a Readd anti xray and oversized block entity patches PaperMC/Paper@8d92274 Drop no longer needed patch PaperMC/Paper@38dc3b2 Optimise chunk tick iteration PaperMC/Paper@84556f3 Add lag compensation for breaking blocks PaperMC/Paper@5dca26c Fix race condition on UpgradeData.BlockFixers class init PaperMC/Paper@ea56138 Fix some issues PaperMC/Paper@025c5d7 rebuild patches PaperMC/Paper@866d2d9 Use correct ClientboundLevelChunkWithLightPacket constructor in later patch PaperMC/Paper@8b9e3dc Optimise nearby player retrieval PaperMC/Paper@11138a7 Re-add remove streams for Brain AI patch PaperMC/Paper@7a00758 Rebuild patches PaperMC/Paper@e284bb1 Updated Upstream (Bukkit/CraftBukkit)
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 0e670de77a7f9926e295e1dd63d909bed1a959ca..791e69b2c963cd034d6d35561448cdb20b1b1cde 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
@@ -2289,6 +2289,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;
|