Search in sources :

Example 11 with EntityLiving

use of net.minecraft.entity.EntityLiving in project MineFactoryReloaded by powercrystals.

the class BlockConveyor method onEntityCollidedWithBlock.

@Override
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) {
    if (entity instanceof EntityPlayer && MFRConfig.conveyorNeverCapturesPlayers.getBoolean(false)) {
        return;
    }
    // TODO: add conveyer entity blacklist: these two cases will be covered conditionally elsewhere
    if (entity.getClass().getName().contains("thaumcraft.common.entities.golems") && MFRConfig.conveyorNeverCapturesTCGolems.getBoolean(false)) {
        return;
    }
    if (!(entity instanceof EntityItem || entity instanceof EntityXPOrb || (entity instanceof EntityLiving && MFRConfig.conveyorCaptureNonItems.getBoolean(true)))) {
        return;
    }
    TileEntity conveyor = world.getBlockTileEntity(x, y, z);
    if (!(conveyor instanceof TileEntityConveyor && ((TileEntityConveyor) conveyor).getConveyorActive())) {
        return;
    }
    if (!world.isRemote && entity instanceof EntityItem) {
        specialRoute(world, x, y, z, (EntityItem) entity);
    }
    double xVelocity = 0;
    double yVelocity = 0;
    double zVelocity = 0;
    int md = world.getBlockMetadata(x, y, z);
    int horizDirection = md & 0x03;
    boolean isUphill = (md & 0x04) != 0;
    boolean isDownhill = (md & 0x08) != 0;
    if (isUphill) {
        yVelocity = 0.25D;
    }
    if (isUphill || isDownhill) {
        entity.onGround = false;
    }
    if (horizDirection == 0) {
        xVelocity = 0.1D;
    } else if (horizDirection == 1) {
        zVelocity = 0.1D;
    } else if (horizDirection == 2) {
        xVelocity = -0.1D;
    } else if (horizDirection == 3) {
        zVelocity = -0.1D;
    }
    if (horizDirection == 0 || horizDirection == 2) {
        if (entity.posZ > z + 0.55D) {
            zVelocity = -0.1D;
        } else if (entity.posZ < z + 0.45D) {
            zVelocity = 0.1D;
        }
    } else if (horizDirection == 1 || horizDirection == 3) {
        if (entity.posX > x + 0.55D) {
            xVelocity = -0.1D;
        } else if (entity.posX < x + 0.45D) {
            xVelocity = 0.1D;
        }
    }
    setEntityVelocity(entity, xVelocity, yVelocity, zVelocity);
    if (entity instanceof EntityLiving) {
        ((EntityLiving) entity).fallDistance = 0;
    } else if (entity instanceof EntityItem) {
        ((EntityItem) entity).delayBeforeCanPickup = 40;
    }
}
Also used : TileEntity(net.minecraft.tileentity.TileEntity) EntityLiving(net.minecraft.entity.EntityLiving) TileEntityConveyor(powercrystals.minefactoryreloaded.tile.conveyor.TileEntityConveyor) EntityPlayer(net.minecraft.entity.player.EntityPlayer) EntityItem(net.minecraft.entity.item.EntityItem) EntityXPOrb(net.minecraft.entity.item.EntityXPOrb)

Example 12 with EntityLiving

use of net.minecraft.entity.EntityLiving in project MineFactoryReloaded by powercrystals.

the class BlockFactoryFluid method onEntityCollidedWithBlock.

@Override
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) {
    if (world.isRemote) {
        return;
    }
    if (entity instanceof EntityPlayer || entity instanceof EntityMob && !((EntityLiving) entity).isEntityUndead()) {
        EntityLiving ent = (EntityLiving) entity;
        if (blockID == MineFactoryReloadedCore.sludgeLiquid.blockID) {
            ent.addPotionEffect(new PotionEffect(Potion.poison.id, 12 * 20, 0));
            ent.addPotionEffect(new PotionEffect(Potion.weakness.id, 12 * 20, 0));
            ent.addPotionEffect(new PotionEffect(Potion.confusion.id, 12 * 20, 0));
        } else if (blockID == MineFactoryReloadedCore.sewageLiquid.blockID) {
            ent.addPotionEffect(new PotionEffect(Potion.hunger.id, 12 * 20, 0));
            ent.addPotionEffect(new PotionEffect(Potion.poison.id, 12 * 20, 0));
            ent.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 12 * 20, 0));
        } else if (blockID == MineFactoryReloadedCore.essenceLiquid.blockID) {
            ent.addPotionEffect(new PotionEffect(Potion.nightVision.id, 60 * 20, 0));
        } else if (blockID == MineFactoryReloadedCore.milkLiquid.blockID) {
            ent.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 6 * 20, 0));
        } else if (blockID == MineFactoryReloadedCore.biofuelLiquid.blockID) {
            ent.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 12 * 20, 0));
        }
    }
    super.onEntityCollidedWithBlock(world, x, y, z, entity);
}
Also used : EntityMob(net.minecraft.entity.monster.EntityMob) EntityLiving(net.minecraft.entity.EntityLiving) PotionEffect(net.minecraft.potion.PotionEffect) EntityPlayer(net.minecraft.entity.player.EntityPlayer)

Example 13 with EntityLiving

use of net.minecraft.entity.EntityLiving in project MineFactoryReloaded by powercrystals.

the class ServerPacketHandler method onPacketData.

@SuppressWarnings("rawtypes")
@Override
public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player) {
    DataInputStream data = new DataInputStream(new ByteArrayInputStream(packet.data));
    int packetType = PacketWrapper.readPacketID(data);
    if (// client -> server: autoenchanter GUI buttons
    packetType == Packets.EnchanterButton) {
        Class[] decodeAs = { Integer.class, Integer.class, Integer.class, Integer.class };
        Object[] packetReadout = PacketWrapper.readPacketData(data, decodeAs);
        TileEntity te = ((EntityPlayer) player).worldObj.getBlockTileEntity((Integer) packetReadout[0], (Integer) packetReadout[1], (Integer) packetReadout[2]);
        if (te instanceof TileEntityAutoEnchanter) {
            ((TileEntityAutoEnchanter) te).setTargetLevel(((TileEntityAutoEnchanter) te).getTargetLevel() + (Integer) packetReadout[3]);
        } else if (te instanceof TileEntityBlockSmasher) {
            ((TileEntityBlockSmasher) te).setFortune(((TileEntityBlockSmasher) te).getFortune() + (Integer) packetReadout[3]);
        } else if (te instanceof TileEntityAutoDisenchanter) {
            Integer v = (Integer) packetReadout[3];
            ((TileEntityAutoDisenchanter) te).setRepeatDisenchant(v == 1 ? true : false);
        }
    } else if (// client -> server: harvester setting
    packetType == Packets.HarvesterButton) {
        Class[] decodeAs = { Integer.class, Integer.class, Integer.class, String.class, Boolean.class };
        Object[] packetReadout = PacketWrapper.readPacketData(data, decodeAs);
        TileEntity te = ((EntityPlayer) player).worldObj.getBlockTileEntity((Integer) packetReadout[0], (Integer) packetReadout[1], (Integer) packetReadout[2]);
        if (te instanceof TileEntityHarvester) {
            ((TileEntityHarvester) te).getSettings().put((String) packetReadout[3], (Boolean) packetReadout[4]);
        }
    } else if (// client -> server: toggle chronotyper
    packetType == Packets.ChronotyperButton) {
        Class[] decodeAs = { Integer.class, Integer.class, Integer.class };
        Object[] packetReadout = PacketWrapper.readPacketData(data, decodeAs);
        TileEntity te = ((EntityPlayer) player).worldObj.getBlockTileEntity((Integer) packetReadout[0], (Integer) packetReadout[1], (Integer) packetReadout[2]);
        if (te instanceof TileEntityChronotyper) {
            ((TileEntityChronotyper) te).setMoveOld(!((TileEntityChronotyper) te).getMoveOld());
        }
    } else if (// client -> server: toggle DSU output side
    packetType == Packets.DSUButton) {
        Class[] decodeAs = { Integer.class, Integer.class, Integer.class, Integer.class };
        Object[] packetReadout = PacketWrapper.readPacketData(data, decodeAs);
        TileEntity te = ((EntityPlayer) player).worldObj.getBlockTileEntity((Integer) packetReadout[0], (Integer) packetReadout[1], (Integer) packetReadout[2]);
        if (te instanceof TileEntityDeepStorageUnit) {
            int side = (Integer) packetReadout[3];
            ((TileEntityDeepStorageUnit) te).setSideIsOutput(side, (!((TileEntityDeepStorageUnit) te).getIsSideOutput(side)));
        }
    } else if (// client -> server: copy record
    packetType == Packets.AutoJukeboxButton) {
        Class[] decodeAs = { Integer.class, Integer.class, Integer.class, Integer.class };
        Object[] packetReadout = PacketWrapper.readPacketData(data, decodeAs);
        TileEntity te = ((EntityPlayer) player).worldObj.getBlockTileEntity((Integer) packetReadout[0], (Integer) packetReadout[1], (Integer) packetReadout[2]);
        if (te instanceof TileEntityAutoJukebox) {
            TileEntityAutoJukebox j = ((TileEntityAutoJukebox) te);
            int button = (Integer) packetReadout[3];
            if (button == 1)
                j.playRecord();
            else if (button == 2)
                j.stopRecord();
            else if (button == 3)
                j.copyRecord();
        }
    } else if (// client -> server: toggle autospawner
    packetType == Packets.AutoSpawnerButton) {
        Class[] decodeAs = { Integer.class, Integer.class, Integer.class };
        Object[] packetReadout = PacketWrapper.readPacketData(data, decodeAs);
        TileEntity te = ((EntityPlayer) player).worldObj.getBlockTileEntity((Integer) packetReadout[0], (Integer) packetReadout[1], (Integer) packetReadout[2]);
        if (te instanceof TileEntityAutoSpawner) {
            ((TileEntityAutoSpawner) te).setSpawnExact(!((TileEntityAutoSpawner) te).getSpawnExact());
        }
    } else if (// client -> server: request circuit from server
    packetType == Packets.LogicRequestCircuitDefinition) {
        Class[] decodeAs = { Integer.class, Integer.class, Integer.class, Integer.class };
        Object[] packetReadout = PacketWrapper.readPacketData(data, decodeAs);
        TileEntity te = ((EntityPlayer) player).worldObj.getBlockTileEntity((Integer) packetReadout[0], (Integer) packetReadout[1], (Integer) packetReadout[2]);
        if (te instanceof TileEntityRedNetLogic) {
            ((TileEntityRedNetLogic) te).sendCircuitDefinition((Integer) packetReadout[3]);
        }
    } else if (// client -> server: set circuit
    packetType == Packets.LogicSetCircuit) {
        Class[] decodeAs = { Integer.class, Integer.class, Integer.class, Integer.class, String.class };
        Object[] packetReadout = PacketWrapper.readPacketData(data, decodeAs);
        TileEntity te = ((EntityPlayer) player).worldObj.getBlockTileEntity((Integer) packetReadout[0], (Integer) packetReadout[1], (Integer) packetReadout[2]);
        if (te instanceof TileEntityRedNetLogic) {
            ((TileEntityRedNetLogic) te).initCircuit((Integer) packetReadout[3], (String) packetReadout[4]);
            ((TileEntityRedNetLogic) te).sendCircuitDefinition((Integer) packetReadout[3]);
        }
    } else if (// client -> server: set pin
    packetType == Packets.LogicSetPin) {
        Class[] decodeAs = { Integer.class, Integer.class, Integer.class, Integer.class, Integer.class, Integer.class, Integer.class, Integer.class };
        Object[] packetReadout = PacketWrapper.readPacketData(data, decodeAs);
        TileEntity te = ((EntityPlayer) player).worldObj.getBlockTileEntity((Integer) packetReadout[0], (Integer) packetReadout[1], (Integer) packetReadout[2]);
        if (te instanceof TileEntityRedNetLogic) {
            if ((Integer) packetReadout[3] == 0) {
                ((TileEntityRedNetLogic) te).setInputPinMapping((Integer) packetReadout[4], (Integer) packetReadout[5], (Integer) packetReadout[6], (Integer) packetReadout[7]);
            } else if ((Integer) packetReadout[3] == 1) {
                ((TileEntityRedNetLogic) te).setOutputPinMapping((Integer) packetReadout[4], (Integer) packetReadout[5], (Integer) packetReadout[6], (Integer) packetReadout[7]);
            }
            ((TileEntityRedNetLogic) te).sendCircuitDefinition((Integer) packetReadout[4]);
        }
    } else if (// client -> server: set circuit
    packetType == Packets.LogicReinitialize) {
        Class[] decodeAs = { Integer.class, Integer.class, Integer.class };
        Object[] packetReadout = PacketWrapper.readPacketData(data, decodeAs);
        TileEntity te = ((EntityPlayer) player).worldObj.getBlockTileEntity((Integer) packetReadout[0], (Integer) packetReadout[1], (Integer) packetReadout[2]);
        if (te instanceof TileEntityRedNetLogic) {
            ((TileEntityRedNetLogic) te).reinitialize((EntityPlayer) player);
        }
    } else if (// client -> server: toggle 'levels'/'reject unmapped' mode
    packetType == Packets.RouterButton) {
        Class[] decodeAs = { Integer.class, Integer.class, Integer.class };
        Object[] packetReadout = PacketWrapper.readPacketData(data, decodeAs);
        TileEntity te = ((EntityPlayer) player).worldObj.getBlockTileEntity((Integer) packetReadout[0], (Integer) packetReadout[1], (Integer) packetReadout[2]);
        if (te instanceof TileEntityEnchantmentRouter) {
            ((TileEntityEnchantmentRouter) te).setMatchLevels(!((TileEntityEnchantmentRouter) te).getMatchLevels());
        } else if (te instanceof TileEntityItemRouter) {
            ((TileEntityItemRouter) te).setRejectUnmapped(!((TileEntityItemRouter) te).getRejectUnmapped());
        }
    } else if (// client -> server: client clicked on a fake slot
    packetType == Packets.FakeSlotChange) {
        Class[] decodeAs = { Integer.class, Integer.class, Integer.class, Integer.class };
        Object[] packetReadout = PacketWrapper.readPacketData(data, decodeAs);
        ItemStack playerStack = ((EntityPlayer) player).inventory.getItemStack();
        Integer slotNumber = (Integer) packetReadout[3];
        TileEntity te = ((EntityPlayer) player).worldObj.getBlockTileEntity((Integer) packetReadout[0], (Integer) packetReadout[1], (Integer) packetReadout[2]);
        if (te instanceof IInventory) {
            if (playerStack == null) {
                ((IInventory) te).setInventorySlotContents(slotNumber, null);
            } else {
                playerStack = playerStack.copy();
                playerStack.stackSize = 1;
                ((IInventory) te).setInventorySlotContents(slotNumber, playerStack);
            }
        }
    } else if (packetType == Packets.RocketLaunchWithLock) {
        Class[] decodeAs = { Integer.class, Integer.class };
        Object[] packetReadout = PacketWrapper.readPacketData(data, decodeAs);
        World world = ((EntityPlayer) player).worldObj;
        Entity owner = world.getEntityByID((Integer) packetReadout[0]);
        Entity target = null;
        if (((Integer) packetReadout[1]) != Integer.MIN_VALUE) {
            target = world.getEntityByID((Integer) packetReadout[1]);
        }
        if (owner instanceof EntityLiving) {
            EntityRocket r = new EntityRocket(world, ((EntityLiving) owner), target);
            world.spawnEntityInWorld(r);
        }
    }
}
Also used : Entity(net.minecraft.entity.Entity) TileEntity(net.minecraft.tileentity.TileEntity) EntityLiving(net.minecraft.entity.EntityLiving) TileEntityEnchantmentRouter(powercrystals.minefactoryreloaded.tile.machine.TileEntityEnchantmentRouter) TileEntityRedNetLogic(powercrystals.minefactoryreloaded.tile.rednet.TileEntityRedNetLogic) World(net.minecraft.world.World) TileEntity(net.minecraft.tileentity.TileEntity) TileEntityAutoEnchanter(powercrystals.minefactoryreloaded.tile.machine.TileEntityAutoEnchanter) TileEntityChronotyper(powercrystals.minefactoryreloaded.tile.machine.TileEntityChronotyper) TileEntityAutoDisenchanter(powercrystals.minefactoryreloaded.tile.machine.TileEntityAutoDisenchanter) IInventory(net.minecraft.inventory.IInventory) TileEntityAutoSpawner(powercrystals.minefactoryreloaded.tile.machine.TileEntityAutoSpawner) TileEntityItemRouter(powercrystals.minefactoryreloaded.tile.machine.TileEntityItemRouter) EntityRocket(powercrystals.minefactoryreloaded.entity.EntityRocket) DataInputStream(java.io.DataInputStream) TileEntityDeepStorageUnit(powercrystals.minefactoryreloaded.tile.machine.TileEntityDeepStorageUnit) ByteArrayInputStream(java.io.ByteArrayInputStream) TileEntityHarvester(powercrystals.minefactoryreloaded.tile.machine.TileEntityHarvester) EntityPlayer(net.minecraft.entity.player.EntityPlayer) TileEntityAutoJukebox(powercrystals.minefactoryreloaded.tile.machine.TileEntityAutoJukebox) TileEntityBlockSmasher(powercrystals.minefactoryreloaded.tile.machine.TileEntityBlockSmasher) ItemStack(net.minecraft.item.ItemStack)

Example 14 with EntityLiving

use of net.minecraft.entity.EntityLiving in project MineFactoryReloaded by powercrystals.

the class TileEntityAutoSpawner method activateMachine.

@Override
protected boolean activateMachine() {
    ItemStack item = getStackInSlot(0);
    if (!isStackValidForSlot(0, item)) {
        setWorkDone(0);
        return false;
    }
    NBTTagCompound itemTag = item.getTagCompound();
    String entityID = itemTag.getString("id");
    boolean isBlackListed = MFRRegistry.getAutoSpawnerBlacklist().contains(entityID);
    blackList: if (!isBlackListed) {
        Class<?> e = (Class<?>) EntityList.stringToClassMapping.get(entityID);
        if (e == null) {
            isBlackListed = true;
            break blackList;
        }
        for (Class<?> t : MFRRegistry.getAutoSpawnerClassBlacklist()) {
            if (t.isAssignableFrom(e)) {
                isBlackListed = true;
                break blackList;
            }
        }
    }
    if (isBlackListed) {
        setWorkDone(0);
        return false;
    }
    if (getWorkDone() < getWorkMax()) {
        if (_tank.getLiquid() != null && _tank.getLiquid().amount >= 10) {
            _tank.getLiquid().amount -= 10;
            setWorkDone(getWorkDone() + 1);
            return true;
        } else {
            return false;
        }
    } else {
        Entity spawnedEntity = EntityList.createEntityByName(entityID, worldObj);
        if (!(spawnedEntity instanceof EntityLiving)) {
            return false;
        }
        EntityLiving spawnedLiving = (EntityLiving) spawnedEntity;
        if (_spawnExact) {
            NBTTagCompound tag = (NBTTagCompound) itemTag.copy();
            spawnedLiving.readEntityFromNBT(tag);
            for (int i = 0; i < 5; ++i) {
                spawnedLiving.func_96120_a(i, 0);
            }
        }
        double x = xCoord + (worldObj.rand.nextDouble() - worldObj.rand.nextDouble()) * _spawnRange;
        double y = yCoord + worldObj.rand.nextInt(3) - 1;
        double z = zCoord + (worldObj.rand.nextDouble() - worldObj.rand.nextDouble()) * _spawnRange;
        spawnedLiving.setLocationAndAngles(x, y, z, worldObj.rand.nextFloat() * 360.0F, 0.0F);
        if (!worldObj.checkNoEntityCollision(spawnedLiving.boundingBox) || !worldObj.getCollidingBoundingBoxes(spawnedLiving, spawnedLiving.boundingBox).isEmpty() || (worldObj.isAnyLiquid(spawnedLiving.boundingBox) != (spawnedLiving instanceof EntityWaterMob))) {
            return false;
        }
        if (!_spawnExact) {
            spawnedLiving.initCreature();
        }
        worldObj.spawnEntityInWorld(spawnedLiving);
        worldObj.playAuxSFX(2004, this.xCoord, this.yCoord, this.zCoord, 0);
        spawnedLiving.spawnExplosionParticle();
        setWorkDone(0);
        return true;
    }
}
Also used : Entity(net.minecraft.entity.Entity) EntityLiving(net.minecraft.entity.EntityLiving) EntityWaterMob(net.minecraft.entity.passive.EntityWaterMob) NBTTagCompound(net.minecraft.nbt.NBTTagCompound) ItemStack(net.minecraft.item.ItemStack)

Example 15 with EntityLiving

use of net.minecraft.entity.EntityLiving in project NetherEx by LogicTechCorp.

the class EntityGoldGolem method initEntityAI.

@Override
protected void initEntityAI() {
    tasks.addTask(1, new EntityAIAttackMelee(this, 1.0D, true));
    tasks.addTask(2, new EntityAIMoveTowardsTarget(this, 0.9D, 32.0F));
    tasks.addTask(3, new EntityAIMoveThroughVillage(this, 0.6D, true));
    tasks.addTask(4, new EntityAIMoveTowardsRestriction(this, 1.0D));
    tasks.addTask(5, new EntityAIGoldGolemLookAtPigtificate(this));
    tasks.addTask(6, new EntityAIWanderAvoidWater(this, 0.6D));
    tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    tasks.addTask(8, new EntityAILookIdle(this));
    targetTasks.addTask(1, new EntityAIGoldGolemDefendVillage(this));
    targetTasks.addTask(2, new EntityAIHurtByTarget(this, false));
    targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityLiving.class, 10, false, true, entity -> entity != null && IMob.VISIBLE_MOB_SELECTOR.apply((EntityLiving) entity) && !(entity instanceof EntitySporeCreeper)));
}
Also used : EntityAIGoldGolemDefendVillage(nex.entity.ai.EntityAIGoldGolemDefendVillage) EntityDataManager(net.minecraft.network.datasync.EntityDataManager) NetherExLootTables(nex.init.NetherExLootTables) EntityAIGoldGolemLookAtPigtificate(nex.entity.ai.EntityAIGoldGolemLookAtPigtificate) EntitySporeCreeper(nex.entity.monster.EntitySporeCreeper) Block(net.minecraft.block.Block) EntityGolem(net.minecraft.entity.monster.EntityGolem) EntityLiving(net.minecraft.entity.EntityLiving) Side(net.minecraftforge.fml.relauncher.Side) PigtificateVillage(nex.village.PigtificateVillage) net.minecraft.entity.ai(net.minecraft.entity.ai) SideOnly(net.minecraftforge.fml.relauncher.SideOnly) NBTTagCompound(net.minecraft.nbt.NBTTagCompound) Entity(net.minecraft.entity.Entity) EntityAIGoldGolemDefendVillage(nex.entity.ai.EntityAIGoldGolemDefendVillage) SoundEvents(net.minecraft.init.SoundEvents) PigtificateVillageManager(nex.village.PigtificateVillageManager) World(net.minecraft.world.World) BlockPos(net.minecraft.util.math.BlockPos) DataParameter(net.minecraft.network.datasync.DataParameter) DamageSource(net.minecraft.util.DamageSource) SharedMonsterAttributes(net.minecraft.entity.SharedMonsterAttributes) IBlockState(net.minecraft.block.state.IBlockState) DataSerializers(net.minecraft.network.datasync.DataSerializers) Material(net.minecraft.block.material.Material) EntityLivingBase(net.minecraft.entity.EntityLivingBase) IMob(net.minecraft.entity.monster.IMob) EntityPlayer(net.minecraft.entity.player.EntityPlayer) MathHelper(net.minecraft.util.math.MathHelper) ResourceLocation(net.minecraft.util.ResourceLocation) EnumParticleTypes(net.minecraft.util.EnumParticleTypes) SoundEvent(net.minecraft.util.SoundEvent) EntityLiving(net.minecraft.entity.EntityLiving) EntitySporeCreeper(nex.entity.monster.EntitySporeCreeper) EntityAIGoldGolemLookAtPigtificate(nex.entity.ai.EntityAIGoldGolemLookAtPigtificate) EntityPlayer(net.minecraft.entity.player.EntityPlayer)

Aggregations

EntityLiving (net.minecraft.entity.EntityLiving)44 Entity (net.minecraft.entity.Entity)14 EntityPlayer (net.minecraft.entity.player.EntityPlayer)14 ItemStack (net.minecraft.item.ItemStack)11 EntityLivingBase (net.minecraft.entity.EntityLivingBase)7 World (net.minecraft.world.World)6 Block (net.minecraft.block.Block)4 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)4 PotionEffect (net.minecraft.potion.PotionEffect)4 SubscribeEvent (cpw.mods.fml.common.eventhandler.SubscribeEvent)3 InvocationTargetException (java.lang.reflect.InvocationTargetException)3 EntityCreature (net.minecraft.entity.EntityCreature)3 BlockPos (net.minecraft.util.math.BlockPos)3 Pos (com.builtbroken.mc.imp.transform.vector.Pos)2 ArrayList (java.util.ArrayList)2 Random (java.util.Random)2 EntityItem (net.minecraft.entity.item.EntityItem)2 EntityXPOrb (net.minecraft.entity.item.EntityXPOrb)2 EntityMob (net.minecraft.entity.monster.EntityMob)2 EntityZombie (net.minecraft.entity.monster.EntityZombie)2