GenuineSounds

Chest Pickup

Jun 6th, 2012
181
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.51 KB | None | 0 0
  1. @Override
  2. public void updateEntity() {
  3.     List<EntityItem> list = this.worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(blockType.minX, blockType.minY, blockType.minZ, blockType.maxX, blockType.maxY, blockType.maxZ));
  4.     for (EntityItem entityItem : list) {
  5.         if (entityItem != null && !entityItem.isDead && !this.worldObj.isRemote && entityItem.delayBeforeCanPickup == 0) {
  6.             addItemStackToInventory(entityItem.item.copy());
  7.             entityItem.setDead();
  8.         }
  9.     }
  10.     super.updateEntity();
  11. }
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment