Files
Purpur/patches/server/0019-World-getPlacementBlockData.patch
William Blake Galbreath fe05292d11 Updated Upstream (Paper & Tuinity)
Upstream has released updates that appears to apply and compile correctly

Paper Changes:
6e7dc3f81 [Auto] Updated Upstream (CraftBukkit)
664ae4554 [Auto] Updated Upstream (CraftBukkit)
dafc7b8f8 Fix off by one error for scheduling block ticks (#4014)
5791e512b Fix MaterialTags tests to actually pass
115972651 Expand MaterialTags v2 (#4009)
5aaf1c514 prevent path space splitting in testServer.sh (#4007)
a8ef09b82 Tighten logic for handling target tick times in tick scheduler (#4010)
d5ccd4139 Remove ability to disable async chunks unless single core cpu
76728529f Fix Light Prioritization Issues
2d66b5be8 [Auto] Updated Upstream (CraftBukkit)
51d10c201 Add missing strikeLighting call to World#spigot()#strikeLightningEffect

Tuinity Changes:
416ed5e Fix 3 tick pistons not functioning correctly
489faf0 Fix up lock handling for UserCache
2020-07-28 12:51:49 -05:00

22 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Sat, 8 Feb 2020 23:30:17 -0600
Subject: [PATCH] World#getPlacementBlockData
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index f51f9c8d11..8d70139228 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2622,5 +2622,10 @@ public class CraftWorld implements World {
public net.pl3x.purpur.MoonPhase getMoonPhase() {
return net.pl3x.purpur.MoonPhase.getPhase(getFullTime() / 24000L);
}
+
+ public BlockData getPlacementBlockData(BlockData blockdata, Location location) {
+ IBlockData validData = net.minecraft.server.Block.getValidBlockForPosition(((CraftBlockData) blockdata).getState(), getHandle(), net.minecraft.server.MCUtil.toBlockPosition(location));
+ return CraftBlockData.fromData(validData == null ? Blocks.AIR.getBlockData() : validData);
+ }
// Purpur end
}