mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-10 17:52:02 -07:00
Update to Minecraft 1.16.1
This commit is contained in:
@@ -9,13 +9,13 @@
|
||||
public class BlockRedstoneTorch extends BlockTorch {
|
||||
|
||||
public static final BlockStateBoolean LIT = BlockProperties.r;
|
||||
@@ -70,8 +72,24 @@
|
||||
@@ -62,8 +64,24 @@
|
||||
list.remove(0);
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ org.bukkit.plugin.PluginManager manager = world.getServer().getPluginManager();
|
||||
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
+ org.bukkit.plugin.PluginManager manager = worldserver.getServer().getPluginManager();
|
||||
+ org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
+ int oldCurrent = ((Boolean) iblockdata.get(BlockRedstoneTorch.LIT)).booleanValue() ? 15 : 0;
|
||||
+
|
||||
+ BlockRedstoneEvent event = new BlockRedstoneEvent(block, oldCurrent, oldCurrent);
|
||||
@@ -31,13 +31,13 @@
|
||||
+ }
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockRedstoneTorch.LIT, false), 3);
|
||||
if (a(world, blockposition, true)) {
|
||||
world.triggerEffect(1502, blockposition, 0);
|
||||
@@ -79,6 +97,15 @@
|
||||
worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockRedstoneTorch.LIT, false), 3);
|
||||
if (a(worldserver, blockposition, true)) {
|
||||
worldserver.triggerEffect(1502, blockposition, 0);
|
||||
@@ -71,6 +89,15 @@
|
||||
}
|
||||
}
|
||||
} else if (!flag && !a(world, blockposition, false)) {
|
||||
} else if (!flag && !a(worldserver, blockposition, false)) {
|
||||
+ // CraftBukkit start
|
||||
+ if (oldCurrent != 15) {
|
||||
+ event.setNewCurrent(15);
|
||||
@@ -47,6 +47,6 @@
|
||||
+ }
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockRedstoneTorch.LIT, true), 3);
|
||||
worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockRedstoneTorch.LIT, true), 3);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user