mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 21:19:00 +01:00
Finalizing the breakage!
This commit is contained in:
parent
7d1849567a
commit
499d44763d
@ -170,7 +170,7 @@ public class BlockButton extends Block {
|
|||||||
//Allow the lever to change the current
|
//Allow the lever to change the current
|
||||||
int old = (j1 != 8) ? 1 : 0;
|
int old = (j1 != 8) ? 1 : 0;
|
||||||
int current = (j1 == 8) ? 1 : 0;
|
int current = (j1 == 8) ? 1 : 0;
|
||||||
BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, BlockFace.SELF, old, current);
|
BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, old, current);
|
||||||
server.getPluginManager().callEvent(eventRedstone);
|
server.getPluginManager().callEvent(eventRedstone);
|
||||||
if ((eventRedstone.getNewCurrent() > 0) == (j1 == 8)) {
|
if ((eventRedstone.getNewCurrent() > 0) == (j1 == 8)) {
|
||||||
world.c(i, j, k, i1 + j1);
|
world.c(i, j, k, i1 + j1);
|
||||||
|
@ -167,7 +167,7 @@ public class BlockLever extends Block {
|
|||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
int old = (j1 != 8) ? 1 : 0;
|
int old = (j1 != 8) ? 1 : 0;
|
||||||
int current = (j1 == 8) ? 1 : 0;
|
int current = (j1 == 8) ? 1 : 0;
|
||||||
BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, BlockFace.SELF, old, current);
|
BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, old, current);
|
||||||
server.getPluginManager().callEvent(eventRedstone);
|
server.getPluginManager().callEvent(eventRedstone);
|
||||||
|
|
||||||
if ((eventRedstone.getNewCurrent() > 0) == (j1 == 8)) {
|
if ((eventRedstone.getNewCurrent() > 0) == (j1 == 8)) {
|
||||||
|
@ -97,7 +97,7 @@ public class BlockRedstoneTorch extends BlockTorch {
|
|||||||
|
|
||||||
// Craftbukkit start
|
// Craftbukkit start
|
||||||
CraftBlock block = (CraftBlock) ((WorldServer) world).getWorld().getBlockAt(i, j, k);
|
CraftBlock block = (CraftBlock) ((WorldServer) world).getWorld().getBlockAt(i, j, k);
|
||||||
BlockRedstoneEvent event = new BlockRedstoneEvent(block, BlockFace.SELF, flag ? 15 : 0, flag ? 0 : 15);
|
BlockRedstoneEvent event = new BlockRedstoneEvent(block, flag ? 15 : 0, flag ? 0 : 15);
|
||||||
((WorldServer) world).getServer().getPluginManager().callEvent(event);
|
((WorldServer) world).getServer().getPluginManager().callEvent(event);
|
||||||
if ((event.getNewCurrent() != 0) == flag) {
|
if ((event.getNewCurrent() != 0) == flag) {
|
||||||
return;
|
return;
|
||||||
|
@ -103,7 +103,7 @@ public class BlockRedstoneWire extends Block {
|
|||||||
// Craftbukkit start
|
// Craftbukkit start
|
||||||
if (k1 != l1) {
|
if (k1 != l1) {
|
||||||
CraftBlock block = (CraftBlock) ((WorldServer) world).getWorld().getBlockAt(i, j, k);
|
CraftBlock block = (CraftBlock) ((WorldServer) world).getWorld().getBlockAt(i, j, k);
|
||||||
BlockRedstoneEvent event = new BlockRedstoneEvent(block, BlockFace.SELF, k1, l1);
|
BlockRedstoneEvent event = new BlockRedstoneEvent(block, k1, l1);
|
||||||
((WorldServer) world).getServer().getPluginManager().callEvent(event);
|
((WorldServer) world).getServer().getPluginManager().callEvent(event);
|
||||||
l1 = event.getNewCurrent();
|
l1 = event.getNewCurrent();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user