@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockButtonAbstract.java
|
||||
+++ b/net/minecraft/world/level/block/BlockButtonAbstract.java
|
||||
@@ -26,6 +26,11 @@
|
||||
@@ -27,6 +27,11 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
+
|
||||
public abstract class BlockButtonAbstract extends BlockAttachable {
|
||||
|
||||
public static final BlockStateBoolean POWERED = BlockProperties.w;
|
||||
@@ -92,6 +97,19 @@
|
||||
public static final BlockStateBoolean POWERED = BlockProperties.POWERED;
|
||||
@@ -97,6 +102,19 @@
|
||||
if ((Boolean) iblockdata.get(BlockButtonAbstract.POWERED)) {
|
||||
return EnumInteractionResult.CONSUME;
|
||||
} else {
|
||||
@@ -31,10 +31,10 @@
|
||||
+ // CraftBukkit end
|
||||
this.d(iblockdata, world, blockposition);
|
||||
this.a(entityhuman, world, blockposition, true);
|
||||
return EnumInteractionResult.a(world.isClientSide);
|
||||
@@ -142,6 +160,16 @@
|
||||
if (this.v) {
|
||||
this.e(iblockdata, (World) worldserver, blockposition);
|
||||
world.a((Entity) entityhuman, GameEvent.BLOCK_PRESS, blockposition);
|
||||
@@ -148,6 +166,16 @@
|
||||
if (this.sensitive) {
|
||||
this.e(iblockdata, worldserver, blockposition);
|
||||
} else {
|
||||
+ // CraftBukkit start
|
||||
+ org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
@@ -49,7 +49,7 @@
|
||||
worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockButtonAbstract.POWERED, false), 3);
|
||||
this.f(iblockdata, (World) worldserver, blockposition);
|
||||
this.a((EntityHuman) null, worldserver, blockposition, false);
|
||||
@@ -162,7 +190,44 @@
|
||||
@@ -169,11 +197,48 @@
|
||||
boolean flag = !list.isEmpty();
|
||||
boolean flag1 = (Boolean) iblockdata.get(BlockButtonAbstract.POWERED);
|
||||
|
||||
@@ -94,3 +94,8 @@
|
||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockButtonAbstract.POWERED, flag), 3);
|
||||
this.f(iblockdata, world, blockposition);
|
||||
this.a((EntityHuman) null, world, blockposition, flag);
|
||||
- world.a((Entity) list.stream().findFirst().orElse((Object) null), flag ? GameEvent.BLOCK_PRESS : GameEvent.BLOCK_UNPRESS, blockposition);
|
||||
+ world.a((Entity) list.stream().findFirst().orElse(null), flag ? GameEvent.BLOCK_PRESS : GameEvent.BLOCK_UNPRESS, blockposition); // CraftBukkit - decompile error
|
||||
}
|
||||
|
||||
if (flag) {
|
||||
|
||||
Reference in New Issue
Block a user