@@ -10,10 +10,10 @@
|
||||
public static final BlockStateBoolean POWERED = BlockProperties.w;
|
||||
@@ -64,6 +66,20 @@
|
||||
|
||||
return true;
|
||||
return EnumInteractionResult.SUCCESS;
|
||||
} else {
|
||||
+ // CraftBukkit start - Interact Lever
|
||||
+ boolean powered = !flag; // Old powered state
|
||||
+ boolean powered = iblockdata.get(BlockLever.POWERED); // Old powered state
|
||||
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
+ int old = (powered) ? 15 : 0;
|
||||
+ int current = (!powered) ? 15 : 0;
|
||||
@@ -22,10 +22,10 @@
|
||||
+ world.getServer().getPluginManager().callEvent(eventRedstone);
|
||||
+
|
||||
+ if ((eventRedstone.getNewCurrent() > 0) != (!powered)) {
|
||||
+ return true;
|
||||
+ return EnumInteractionResult.SUCCESS;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
world.setTypeAndData(blockposition, iblockdata, 3);
|
||||
float f = flag ? 0.6F : 0.5F;
|
||||
iblockdata1 = this.d(iblockdata, world, blockposition);
|
||||
float f = (Boolean) iblockdata1.get(BlockLever.POWERED) ? 0.6F : 0.5F;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user