mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-20 14:53:49 -07:00
@@ -9,19 +9,19 @@
|
||||
public class BlockCommand extends BlockTileEntity {
|
||||
|
||||
private static final Logger c = LogManager.getLogger();
|
||||
@@ -30,6 +32,15 @@
|
||||
@@ -32,6 +34,15 @@
|
||||
TileEntityCommand tileentitycommand = (TileEntityCommand) tileentity;
|
||||
boolean flag = world.isBlockIndirectlyPowered(blockposition);
|
||||
boolean flag1 = tileentitycommand.d();
|
||||
boolean flag1 = world.isBlockIndirectlyPowered(blockposition);
|
||||
boolean flag2 = tileentitycommand.d();
|
||||
+ // CraftBukkit start
|
||||
+ org.bukkit.block.Block bukkitBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
+ int old = flag1 ? 15 : 0;
|
||||
+ int current = flag ? 15 : 0;
|
||||
+ int old = flag2 ? 15 : 0;
|
||||
+ int current = flag1 ? 15 : 0;
|
||||
+
|
||||
+ BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(bukkitBlock, old, current);
|
||||
+ world.getServer().getPluginManager().callEvent(eventRedstone);
|
||||
+ flag = eventRedstone.getNewCurrent() > 0;
|
||||
+ flag1 = eventRedstone.getNewCurrent() > 0;
|
||||
+ // CraftBukkit end
|
||||
|
||||
tileentitycommand.a(flag);
|
||||
if (!flag1 && !tileentitycommand.e() && tileentitycommand.j() != TileEntityCommand.Type.SEQUENCE) {
|
||||
tileentitycommand.a(flag1);
|
||||
if (!flag2 && !tileentitycommand.f() && tileentitycommand.t() != TileEntityCommand.Type.SEQUENCE) {
|
||||
|
Reference in New Issue
Block a user