Update to Minecraft 1.14-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-04-23 12:00:00 +10:00
parent 0e98365784
commit a0f2b74c8d
560 changed files with 10642 additions and 10867 deletions

View File

@@ -6,12 +6,12 @@
import javax.annotation.Nullable;
+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
public class BlockTrapdoor extends BlockFacingHorizontal implements IFluidSource, IFluidContainer {
public class BlockTrapdoor extends BlockFacingHorizontal implements IBlockWaterlogged {
@@ -88,6 +89,19 @@
boolean flag = world.isBlockIndirectlyPowered(blockposition);
boolean flag1 = world.isBlockIndirectlyPowered(blockposition);
if (flag != (Boolean) iblockdata.get(BlockTrapdoor.c)) {
if (flag1 != (Boolean) iblockdata.get(BlockTrapdoor.c)) {
+ // CraftBukkit start
+ org.bukkit.World bworld = world.getWorld();
+ org.bukkit.block.Block bblock = bworld.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
@@ -22,9 +22,9 @@
+ if (oldPower == 0 ^ power == 0 || block.getBlockData().isPowerSource()) {
+ BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(bblock, oldPower, power);
+ world.getServer().getPluginManager().callEvent(eventRedstone);
+ flag = eventRedstone.getNewCurrent() > 0;
+ flag1 = eventRedstone.getNewCurrent() > 0;
+ }
+ // CraftBukkit end
if ((Boolean) iblockdata.get(BlockTrapdoor.OPEN) != flag) {
iblockdata = (IBlockData) iblockdata.set(BlockTrapdoor.OPEN, flag);
this.a((EntityHuman) null, world, blockposition, flag);
if ((Boolean) iblockdata.get(BlockTrapdoor.OPEN) != flag1) {
iblockdata = (IBlockData) iblockdata.set(BlockTrapdoor.OPEN, flag1);
this.a((EntityHuman) null, world, blockposition, flag1);