Advertisement
Telinc1

Untitled

Mar 31st, 2013
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. --- ../src_base/minecraft/net/minecraft/entity/boss/EntityWither.java
  2. +++ ../src_work/minecraft/net/minecraft/entity/boss/EntityWither.java
  3. @@ -26,3 +26,6 @@
  4. import net.minecraft.util.DamageSource;
  5. import net.minecraft.util.MathHelper;
  6. import net.minecraft.world.World;
  7. +
  8. +import net.minecraftforge.common.MinecraftForge;
  9. +import net.minecraftforge.event.entity.living.WitherDestroyBlockEvent;
  10. @@ -372,8 +375,14 @@
  11. int k2 = i + i2;
  12. int l2 = j1 + l1;
  13. int i3 = this.worldObj.getBlockId(j2, k2, l2);
  14.  
  15. - if (i3 > 0 && i3 != Block.bedrock.blockID && i3 != Block.endPortal.blockID && i3 != Block.endPortalFrame.blockID)
  16. - {
  17. - flag = this.worldObj.destroyBlock(j2, k2, l2, true) || flag;
  18. - }
  19. + if (i3 > 0)
  20. + {
  21. + WitherDestroyBlockEvent event = new WitherDestroyBlockEvent(this, i3);
  22. + MinecraftForge.EVENT_BUS.post(event);
  23. +
  24. + if (!event.isCanceled())
  25. + {
  26. + flag = this.worldObj.destroyBlock(j2, k2, l2, true) || flag;
  27. + }
  28. + }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement