Update to Minecraft 1.15
By: md_5 <git@md-5.net>
This commit is contained in:
parent
1400103b2f
commit
0e142c7f03
293 changed files with 2875 additions and 2648 deletions
|
@ -14,7 +14,7 @@
|
|||
public static final BlockStateBoolean POWERED = BlockProperties.w;
|
||||
@@ -71,6 +76,19 @@
|
||||
if ((Boolean) iblockdata.get(BlockButtonAbstract.POWERED)) {
|
||||
return true;
|
||||
return EnumInteractionResult.CONSUME;
|
||||
} else {
|
||||
+ // CraftBukkit start
|
||||
+ boolean powered = ((Boolean) iblockdata.get(POWERED));
|
||||
|
@ -26,30 +26,30 @@
|
|||
+ world.getServer().getPluginManager().callEvent(eventRedstone);
|
||||
+
|
||||
+ if ((eventRedstone.getNewCurrent() > 0) != (!powered)) {
|
||||
+ return true;
|
||||
+ return EnumInteractionResult.SUCCESS;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockButtonAbstract.POWERED, true), 3);
|
||||
this.d(iblockdata, world, blockposition);
|
||||
this.a(entityhuman, world, blockposition, true);
|
||||
this.e(iblockdata, world, blockposition);
|
||||
@@ -117,6 +135,16 @@
|
||||
return EnumInteractionResult.SUCCESS;
|
||||
@@ -121,6 +139,16 @@
|
||||
if (this.D) {
|
||||
this.d(iblockdata, world, blockposition);
|
||||
this.e(iblockdata, (World) worldserver, blockposition);
|
||||
} else {
|
||||
+ // CraftBukkit start
|
||||
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
+ org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
+
|
||||
+ BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, 15, 0);
|
||||
+ world.getServer().getPluginManager().callEvent(eventRedstone);
|
||||
+ worldserver.getServer().getPluginManager().callEvent(eventRedstone);
|
||||
+
|
||||
+ if (eventRedstone.getNewCurrent() > 0) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockButtonAbstract.POWERED, false), 3);
|
||||
this.e(iblockdata, world, blockposition);
|
||||
this.a((EntityHuman) null, world, blockposition, false);
|
||||
@@ -137,7 +165,44 @@
|
||||
worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockButtonAbstract.POWERED, false), 3);
|
||||
this.f(iblockdata, worldserver, blockposition);
|
||||
this.a((EntityHuman) null, worldserver, blockposition, false);
|
||||
@@ -141,7 +169,44 @@
|
||||
boolean flag = !list.isEmpty();
|
||||
boolean flag1 = (Boolean) iblockdata.get(BlockButtonAbstract.POWERED);
|
||||
|
||||
|
@ -92,5 +92,5 @@
|
|||
+ }
|
||||
+ // CraftBukkit end
|
||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockButtonAbstract.POWERED, flag), 3);
|
||||
this.e(iblockdata, world, blockposition);
|
||||
this.f(iblockdata, world, blockposition);
|
||||
this.a((EntityHuman) null, world, blockposition, flag);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue