diff options
Diffstat (limited to 'nms-patches')
-rw-r--r-- | nms-patches/BlockConcretePowder.patch | 22 | ||||
-rw-r--r-- | nms-patches/BlockFlowing.patch | 2 | ||||
-rw-r--r-- | nms-patches/BlockFluids.patch | 4 | ||||
-rw-r--r-- | nms-patches/EnchantmentFrostWalker.patch | 2 | ||||
-rw-r--r-- | nms-patches/EntitySnowman.patch | 2 | ||||
-rw-r--r-- | nms-patches/WorldServer.patch | 4 |
6 files changed, 29 insertions, 7 deletions
diff --git a/nms-patches/BlockConcretePowder.patch b/nms-patches/BlockConcretePowder.patch new file mode 100644 index 00000000..dd2708f7 --- /dev/null +++ b/nms-patches/BlockConcretePowder.patch @@ -0,0 +1,22 @@ +--- a/net/minecraft/server/BlockConcretePowder.java ++++ b/net/minecraft/server/BlockConcretePowder.java +@@ -11,8 +11,8 @@ + } + + public void a(World world, BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1) { +- if (iblockdata1.getMaterial().isLiquid()) { +- world.setTypeAndData(blockposition, Blocks.dR.getBlockData().set(BlockCloth.COLOR, iblockdata.get(BlockConcretePowder.a)), 3); ++ if (iblockdata1.getMaterial().isLiquid() && world.getType(blockposition).getBlock() != Blocks.dR) { // CraftBukkit - don't double concrete ++ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition, Blocks.dR.getBlockData().set(BlockCloth.COLOR, iblockdata.get(BlockConcretePowder.a)), null); // CraftBukkit + } + + } +@@ -36,7 +36,7 @@ + } + + if (flag) { +- world.setTypeAndData(blockposition, Blocks.dR.getBlockData().set(BlockCloth.COLOR, iblockdata.get(BlockConcretePowder.a)), 3); ++ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition, Blocks.dR.getBlockData().set(BlockCloth.COLOR, iblockdata.get(BlockConcretePowder.a)), null); // CraftBukkit + } + + return flag; diff --git a/nms-patches/BlockFlowing.patch b/nms-patches/BlockFlowing.patch index d6253aff..55906695 100644 --- a/nms-patches/BlockFlowing.patch +++ b/nms-patches/BlockFlowing.patch @@ -33,7 +33,7 @@ - world.setTypeUpdate(blockposition.down(), Blocks.STONE.getBlockData()); - this.fizz(world, blockposition.down()); + // CraftBukkit start -+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition.down(), Blocks.STONE, null)) { ++ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition.down(), Blocks.STONE.getBlockData(), null)) { + this.fizz(world, blockposition.down()); + } + // CraftBukkit end diff --git a/nms-patches/BlockFluids.patch b/nms-patches/BlockFluids.patch index 8708adc5..cccec394 100644 --- a/nms-patches/BlockFluids.patch +++ b/nms-patches/BlockFluids.patch @@ -7,7 +7,7 @@ - world.setTypeUpdate(blockposition, Blocks.OBSIDIAN.getBlockData()); - this.fizz(world, blockposition); + // CraftBukkit start -+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition, Blocks.OBSIDIAN, null)) { ++ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition, Blocks.OBSIDIAN.getBlockData(), null)) { + this.fizz(world, blockposition); + } + // CraftBukkit end @@ -18,7 +18,7 @@ - world.setTypeUpdate(blockposition, Blocks.COBBLESTONE.getBlockData()); - this.fizz(world, blockposition); + // CraftBukkit start -+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition, Blocks.COBBLESTONE, null)) { ++ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition, Blocks.COBBLESTONE.getBlockData(), null)) { + this.fizz(world, blockposition); + } + // CraftBukkit end diff --git a/nms-patches/EnchantmentFrostWalker.patch b/nms-patches/EnchantmentFrostWalker.patch index fedf1a39..c4f9f2b8 100644 --- a/nms-patches/EnchantmentFrostWalker.patch +++ b/nms-patches/EnchantmentFrostWalker.patch @@ -16,7 +16,7 @@ - world.setTypeUpdate(blockposition_mutableblockposition1, Blocks.FROSTED_ICE.getBlockData()); - world.a(blockposition_mutableblockposition1.h(), Blocks.FROSTED_ICE, MathHelper.nextInt(entityliving.getRandom(), 60, 120)); + // CraftBukkit Start - Call EntityBlockFormEvent for Frost Walker -+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition_mutableblockposition1, Blocks.FROSTED_ICE, entityliving)) { ++ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition_mutableblockposition1, Blocks.FROSTED_ICE.getBlockData(), entityliving)) { + world.a(blockposition_mutableblockposition1.h(), Blocks.FROSTED_ICE, MathHelper.nextInt(entityliving.getRandom(), 60, 120)); + } + // CraftBukkit End diff --git a/nms-patches/EntitySnowman.patch b/nms-patches/EntitySnowman.patch index 244f48b1..029613e4 100644 --- a/nms-patches/EntitySnowman.patch +++ b/nms-patches/EntitySnowman.patch @@ -26,7 +26,7 @@ if (this.world.getType(blockposition).getMaterial() == Material.AIR && this.world.getBiome(blockposition).a(blockposition) < 0.8F && Blocks.SNOW_LAYER.canPlace(this.world, blockposition)) { - this.world.setTypeUpdate(blockposition, Blocks.SNOW_LAYER.getBlockData()); -+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this.world, blockposition, Blocks.SNOW_LAYER, this); // CraftBukkit ++ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this.world, blockposition, Blocks.SNOW_LAYER.getBlockData(), this); // CraftBukkit } } } diff --git a/nms-patches/WorldServer.patch b/nms-patches/WorldServer.patch index 0939b139..a5a556f0 100644 --- a/nms-patches/WorldServer.patch +++ b/nms-patches/WorldServer.patch @@ -284,12 +284,12 @@ if (this.v(blockposition1)) { - this.setTypeUpdate(blockposition1, Blocks.ICE.getBlockData()); -+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this, blockposition1, Blocks.ICE, null); // CraftBukkit ++ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this, blockposition1, Blocks.ICE.getBlockData(), null); // CraftBukkit } if (flag && this.f(blockposition, true)) { - this.setTypeUpdate(blockposition, Blocks.SNOW_LAYER.getBlockData()); -+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this, blockposition, Blocks.SNOW_LAYER, null); // CraftBukkit ++ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this, blockposition, Blocks.SNOW_LAYER.getBlockData(), null); // CraftBukkit } if (flag && this.getBiome(blockposition1).d()) { |