mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 20:23:53 -07:00
Update to Minecraft 1.13-pre7
This commit is contained in:
@@ -1,23 +1,23 @@
|
||||
--- a/net/minecraft/server/EntitySilverfish.java
|
||||
+++ b/net/minecraft/server/EntitySilverfish.java
|
||||
@@ -157,6 +157,11 @@
|
||||
@@ -153,6 +153,11 @@
|
||||
IBlockData iblockdata = world.getType(blockposition);
|
||||
|
||||
if (BlockMonsterEggs.x(iblockdata)) {
|
||||
if (BlockMonsterEggs.j(iblockdata)) {
|
||||
+ // CraftBukkit start
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.a, blockposition, Blocks.MONSTER_EGG, Block.getId(BlockMonsterEggs.getById(iblockdata.getBlock().toLegacyData(iblockdata)))).isCancelled()) {
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.a, blockposition, BlockMonsterEggs.f(iblockdata.getBlock())).isCancelled()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
world.setTypeAndData(blockposition, Blocks.MONSTER_EGG.getBlockData().set(BlockMonsterEggs.VARIANT, BlockMonsterEggs.EnumMonsterEggVarient.a(iblockdata)), 3);
|
||||
world.setTypeAndData(blockposition, BlockMonsterEggs.f(iblockdata.getBlock()), 3);
|
||||
this.a.doSpawnEffect();
|
||||
this.a.die();
|
||||
@@ -200,6 +205,11 @@
|
||||
IBlockData iblockdata = world.getType(blockposition1);
|
||||
@@ -197,6 +202,11 @@
|
||||
Block block = iblockdata.getBlock();
|
||||
|
||||
if (iblockdata.getBlock() == Blocks.MONSTER_EGG) {
|
||||
if (block instanceof BlockMonsterEggs) {
|
||||
+ // CraftBukkit start
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.silverfish, blockposition1, Blocks.AIR, 0).isCancelled()) {
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.silverfish, blockposition1, Blocks.AIR.getBlockData()).isCancelled()) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
Reference in New Issue
Block a user