Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- ../src_base/minecraft/net/minecraft/entity/boss/EntityWither.java
- +++ ../src_work/minecraft/net/minecraft/entity/boss/EntityWither.java
- @@ -26,3 +26,6 @@
- import net.minecraft.util.DamageSource;
- import net.minecraft.util.MathHelper;
- import net.minecraft.world.World;
- +
- +import net.minecraftforge.common.MinecraftForge;
- +import net.minecraftforge.event.entity.living.WitherDestroyBlockEvent;
- @@ -372,8 +375,14 @@
- int k2 = i + i2;
- int l2 = j1 + l1;
- int i3 = this.worldObj.getBlockId(j2, k2, l2);
- - if (i3 > 0 && i3 != Block.bedrock.blockID && i3 != Block.endPortal.blockID && i3 != Block.endPortalFrame.blockID)
- - {
- - flag = this.worldObj.destroyBlock(j2, k2, l2, true) || flag;
- - }
- + if (i3 > 0)
- + {
- + WitherDestroyBlockEvent event = new WitherDestroyBlockEvent(this, i3);
- + MinecraftForge.EVENT_BUS.post(event);
- +
- + if (!event.isCanceled())
- + {
- + flag = this.worldObj.destroyBlock(j2, k2, l2, true) || flag;
- + }
- + }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement