/** Called to update the entity's position/logic. */ public void onUpdate() { super.onUpdate(); if (!this.worldObj.isRemote && this.isEntityAlive() && this.getBlocked()) { BlockPos blockpos = new BlockPos(this); if (blockpos.equals(this.field_174900_c)) { --this.transferTicker; } else { this.setTransferTicker(0); } if (!this.canTransfer()) { this.setTransferTicker(0); if (this.func_96112_aD()) { this.setTransferTicker(4); this.markDirty(); } } } }
public void killMinecart(DamageSource par1DamageSource) { super.killMinecart(par1DamageSource); this.dropItemWithOffset(Block.chest.blockID, 1, 0.0F); }
/** (abstract) Protected helper method to read subclass entity data from NBT. */ protected void readEntityFromNBT(NBTTagCompound tagCompund) { super.readEntityFromNBT(tagCompund); this.transferTicker = tagCompund.getInteger("TransferCooldown"); }
/** (abstract) Protected helper method to write subclass entity data to NBT. */ protected void writeEntityToNBT(NBTTagCompound tagCompound) { super.writeEntityToNBT(tagCompound); tagCompound.setInteger("TransferCooldown", this.transferTicker); }
public void killMinecart(DamageSource p_94095_1_) { super.killMinecart(p_94095_1_); this.dropItemWithOffset(Item.getItemFromBlock(Blocks.hopper), 1, 0.0F); }
public void killMinecart(DamageSource par1DamageSource) { super.killMinecart(par1DamageSource); this.func_145778_a(Item.getItemFromBlock(Blocks.chest), 1, 0.0F); }