Java Code Examples for net.minecraft.entity.monster.EntityEnderman

The following are top voted examples for showing how to use net.minecraft.entity.monster.EntityEnderman. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: CustomWorldGen   File: LayerHeldBlock.java   View source code 7 votes vote down vote up
public void doRenderLayer(EntityEnderman entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
    IBlockState iblockstate = entitylivingbaseIn.getHeldBlockState();

    if (iblockstate != null)
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.enableRescaleNormal();
        GlStateManager.pushMatrix();
        GlStateManager.translate(0.0F, 0.6875F, -0.75F);
        GlStateManager.rotate(20.0F, 1.0F, 0.0F, 0.0F);
        GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(0.25F, 0.1875F, 0.25F);
        float f = 0.5F;
        GlStateManager.scale(-0.5F, -0.5F, 0.5F);
        int i = entitylivingbaseIn.getBrightnessForRender(partialTicks);
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j, (float)k);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.endermanRenderer.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
        blockrendererdispatcher.renderBlockBrightness(iblockstate, 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.disableRescaleNormal();
    }
}
 
Example 2
Project: Bewitchment   File: BlockSaltBarrier.java   View source code 6 votes vote down vote up
@SuppressWarnings("deprecation")
@Override
public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn, boolean p_185477_7_) {
	if (entityIn instanceof EntityLivingBase && (((EntityLivingBase) entityIn).getCreatureAttribute() == EnumCreatureAttribute.UNDEAD)) {
		collidingBoxes.add(new AxisAlignedBB(pos).expand(0, 255, 0));
	}
	if (entityIn instanceof EntityLivingBase && (((EntityLivingBase) entityIn).getCreatureAttribute() == EnumCreatureAttribute.ARTHROPOD)) {
		entityIn.attackEntityFrom(DamageSource.MAGIC, 1);
	}
	if (entityIn instanceof EntityBlaze) {
		collidingBoxes.add(new AxisAlignedBB(pos).expand(0, 255, 0));
	}
	if (entityIn instanceof EntityEnderman) {
		collidingBoxes.add(new AxisAlignedBB(pos).expand(0, 255, 0));
	}
	if (entityIn instanceof EntityGhast) {
		collidingBoxes.add(new AxisAlignedBB(pos).expand(0, 255, 0));
	}
	if (entityIn instanceof EntityVex) {
		collidingBoxes.add(new AxisAlignedBB(pos).expand(0, 255, 0));
	}
}
 
Example 3
Project: ForgeHax   File: EntityUtils.java   View source code 6 votes vote down vote up
/**
 * Checks if the mob could be possibly hostile towards us (we can't detect their attack target easily)
 * Current entities:
 *                  PigZombie: Aggressive if arms are raised, when arms are put down a internal timer is slowly ticked down from 400
 *                  Wolf: Aggressive if the owner isn't the local player and the wolf is angry
 *                  Enderman: Aggressive if making screaming sounds
 */
public static boolean isMobAggressive(Entity entity) {
    if(entity instanceof EntityPigZombie) {
        // arms raised = aggressive, angry = either game or we have set the anger cooldown
        if(((EntityPigZombie) entity).isArmsRaised() || ((EntityPigZombie) entity).isAngry()) {
            if(!((EntityPigZombie) entity).isAngry()) {
                // set pigmens anger to 400 if it hasn't been angered already
                FastReflection.Fields.EntityPigZombie_angerLevel.set((EntityPigZombie)entity, 400);
            }
            return true;
        }
    } else if(entity instanceof EntityWolf) {
        return ((EntityWolf) entity).isAngry() &&
                !MC.player.equals(((EntityWolf) entity).getOwner());
    } else if(entity instanceof EntityEnderman) {
        return ((EntityEnderman) entity).isScreaming();
    }
    return false;
}
 
Example 4
Project: DecompiledMinecraft   File: LayerHeldBlock.java   View source code 6 votes vote down vote up
public void doRenderLayer(EntityEnderman entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
    IBlockState iblockstate = entitylivingbaseIn.getHeldBlockState();

    if (iblockstate.getBlock().getMaterial() != Material.air)
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.enableRescaleNormal();
        GlStateManager.pushMatrix();
        GlStateManager.translate(0.0F, 0.6875F, -0.75F);
        GlStateManager.rotate(20.0F, 1.0F, 0.0F, 0.0F);
        GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(0.25F, 0.1875F, 0.25F);
        float f = 0.5F;
        GlStateManager.scale(-f, -f, f);
        int i = entitylivingbaseIn.getBrightnessForRender(partialTicks);
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.endermanRenderer.bindTexture(TextureMap.locationBlocksTexture);
        blockrendererdispatcher.renderBlockBrightness(iblockstate, 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.disableRescaleNormal();
    }
}
 
Example 5
Project: DecompiledMinecraft   File: LayerEndermanEyes.java   View source code 6 votes vote down vote up
public void doRenderLayer(EntityEnderman entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
    this.endermanRenderer.bindTexture(field_177203_a);
    GlStateManager.enableBlend();
    GlStateManager.disableAlpha();
    GlStateManager.blendFunc(1, 1);
    GlStateManager.disableLighting();
    GlStateManager.depthMask(!entitylivingbaseIn.isInvisible());
    int i = 61680;
    int j = i % 65536;
    int k = i / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
    GlStateManager.enableLighting();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.endermanRenderer.getMainModel().render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
    this.endermanRenderer.func_177105_a(entitylivingbaseIn, partialTicks);
    GlStateManager.depthMask(true);
    GlStateManager.disableBlend();
    GlStateManager.enableAlpha();
}
 
Example 6
Project: DecompiledMinecraft   File: EntityRenderer.java   View source code 6 votes vote down vote up
/**
 * What shader to use when spectating this entity
 */
public void loadEntityShader(Entity entityIn)
{
    if (OpenGlHelper.shadersSupported)
    {
        if (this.theShaderGroup != null)
        {
            this.theShaderGroup.deleteShaderGroup();
        }

        this.theShaderGroup = null;

        if (entityIn instanceof EntityCreeper)
        {
            this.loadShader(new ResourceLocation("shaders/post/creeper.json"));
        }
        else if (entityIn instanceof EntitySpider)
        {
            this.loadShader(new ResourceLocation("shaders/post/spider.json"));
        }
        else if (entityIn instanceof EntityEnderman)
        {
            this.loadShader(new ResourceLocation("shaders/post/invert.json"));
        }
    }
}
 
Example 7
Project: BaseClient   File: LayerHeldBlock.java   View source code 6 votes vote down vote up
public void doRenderLayer(EntityEnderman entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
    IBlockState iblockstate = entitylivingbaseIn.getHeldBlockState();

    if (iblockstate.getBlock().getMaterial() != Material.air)
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.enableRescaleNormal();
        GlStateManager.pushMatrix();
        GlStateManager.translate(0.0F, 0.6875F, -0.75F);
        GlStateManager.rotate(20.0F, 1.0F, 0.0F, 0.0F);
        GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(0.25F, 0.1875F, 0.25F);
        float f = 0.5F;
        GlStateManager.scale(-f, -f, f);
        int i = entitylivingbaseIn.getBrightnessForRender(partialTicks);
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.endermanRenderer.bindTexture(TextureMap.locationBlocksTexture);
        blockrendererdispatcher.renderBlockBrightness(iblockstate, 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.disableRescaleNormal();
    }
}
 
Example 8
Project: BaseClient   File: LayerEndermanEyes.java   View source code 6 votes vote down vote up
public void doRenderLayer(EntityEnderman entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
    this.endermanRenderer.bindTexture(field_177203_a);
    GlStateManager.enableBlend();
    GlStateManager.disableAlpha();
    GlStateManager.blendFunc(1, 1);
    GlStateManager.disableLighting();
    GlStateManager.depthMask(!entitylivingbaseIn.isInvisible());
    int i = 61680;
    int j = i % 65536;
    int k = i / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
    GlStateManager.enableLighting();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.endermanRenderer.getMainModel().render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
    this.endermanRenderer.func_177105_a(entitylivingbaseIn, partialTicks);
    GlStateManager.depthMask(true);
    GlStateManager.disableBlend();
    GlStateManager.enableAlpha();
}
 
Example 9
Project: BaseClient   File: LayerHeldBlock.java   View source code 6 votes vote down vote up
public void doRenderLayer(EntityEnderman entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
    IBlockState iblockstate = entitylivingbaseIn.getHeldBlockState();

    if (iblockstate.getBlock().getMaterial() != Material.air)
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.enableRescaleNormal();
        GlStateManager.pushMatrix();
        GlStateManager.translate(0.0F, 0.6875F, -0.75F);
        GlStateManager.rotate(20.0F, 1.0F, 0.0F, 0.0F);
        GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(0.25F, 0.1875F, 0.25F);
        float f = 0.5F;
        GlStateManager.scale(-f, -f, f);
        int i = entitylivingbaseIn.getBrightnessForRender(partialTicks);
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.endermanRenderer.bindTexture(TextureMap.locationBlocksTexture);
        blockrendererdispatcher.renderBlockBrightness(iblockstate, 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.disableRescaleNormal();
    }
}
 
Example 10
Project: BaseClient   File: LayerEndermanEyes.java   View source code 6 votes vote down vote up
public void doRenderLayer(EntityEnderman entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
    this.endermanRenderer.bindTexture(field_177203_a);
    GlStateManager.enableBlend();
    GlStateManager.disableAlpha();
    GlStateManager.blendFunc(1, 1);
    GlStateManager.disableLighting();
    GlStateManager.depthMask(!entitylivingbaseIn.isInvisible());
    int i = 61680;
    int j = i % 65536;
    int k = i / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
    GlStateManager.enableLighting();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.endermanRenderer.getMainModel().render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
    this.endermanRenderer.func_177105_a(entitylivingbaseIn, partialTicks);
    GlStateManager.depthMask(true);
    GlStateManager.disableBlend();
    GlStateManager.enableAlpha();
}
 
Example 11
Project: BaseClient   File: EntityRenderer.java   View source code 6 votes vote down vote up
/**
 * What shader to use when spectating this entity
 */
public void loadEntityShader(Entity entityIn) {
	if (OpenGlHelper.shadersSupported) {
		if (this.theShaderGroup != null) {
			this.theShaderGroup.deleteShaderGroup();
		}

		this.theShaderGroup = null;

		if (entityIn instanceof EntityCreeper) {
			this.loadShader(new ResourceLocation("shaders/post/creeper.json"));
		} else if (entityIn instanceof EntitySpider) {
			this.loadShader(new ResourceLocation("shaders/post/spider.json"));
		} else if (entityIn instanceof EntityEnderman) {
			this.loadShader(new ResourceLocation("shaders/post/invert.json"));
		}
	}
}
 
Example 12
Project: EndermanEvolution   File: ModEvents.java   View source code 6 votes vote down vote up
@SubscribeEvent
public void onTargetSelect(LivingSetAttackTargetEvent e) {
	if (e.getEntityLiving() instanceof EntityEnderman && e.getTarget() instanceof EntityPlayer) {
		EntityPlayer player = (EntityPlayer) e.getTarget();
		ItemStack stack = player.inventory.armorInventory.get(3);
		boolean stopAttack = false;
		if (!stack.isEmpty() && stack.getItem() instanceof ItemSkullBase) {
			ItemSkullBase skull = (ItemSkullBase) stack.getItem();
			if (skull.isEndermanSkull()) {
				stopAttack = true;
			}
		}
		if (stopAttack) {
			((EntityLiving) e.getEntityLiving()).setAttackTarget(null);
		}
	}
}
 
Example 13
Project: Backmemed   File: RenderEnderman.java   View source code 6 votes vote down vote up
/**
 * Renders the desired {@code T} type Entity.
 */
public void doRender(EntityEnderman entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    IBlockState iblockstate = entity.getHeldBlockState();
    ModelEnderman modelenderman = this.getMainModel();
    modelenderman.isCarrying = iblockstate != null;
    modelenderman.isAttacking = entity.isScreaming();

    if (entity.isScreaming())
    {
        double d0 = 0.02D;
        x += this.rnd.nextGaussian() * 0.02D;
        z += this.rnd.nextGaussian() * 0.02D;
    }

    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
 
Example 14
Project: Backmemed   File: LayerHeldBlock.java   View source code 6 votes vote down vote up
public void doRenderLayer(EntityEnderman entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
    IBlockState iblockstate = entitylivingbaseIn.getHeldBlockState();

    if (iblockstate != null)
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.enableRescaleNormal();
        GlStateManager.pushMatrix();
        GlStateManager.translate(0.0F, 0.6875F, -0.75F);
        GlStateManager.rotate(20.0F, 1.0F, 0.0F, 0.0F);
        GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(0.25F, 0.1875F, 0.25F);
        float f = 0.5F;
        GlStateManager.scale(-0.5F, -0.5F, 0.5F);
        int i = entitylivingbaseIn.getBrightnessForRender(partialTicks);
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j, (float)k);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.endermanRenderer.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
        blockrendererdispatcher.renderBlockBrightness(iblockstate, 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.disableRescaleNormal();
    }
}
 
Example 15
Project: CustomWorldGen   File: RenderEnderman.java   View source code 6 votes vote down vote up
/**
 * Renders the desired {@code T} type Entity.
 */
public void doRender(EntityEnderman entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    IBlockState iblockstate = entity.getHeldBlockState();
    this.endermanModel.isCarrying = iblockstate != null;
    this.endermanModel.isAttacking = entity.isScreaming();

    if (entity.isScreaming())
    {
        double d0 = 0.02D;
        x += this.rnd.nextGaussian() * 0.02D;
        z += this.rnd.nextGaussian() * 0.02D;
    }

    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
 
Example 16
Project: CustomWorldGen   File: LayerEndermanEyes.java   View source code 6 votes vote down vote up
public void doRenderLayer(EntityEnderman entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
    this.endermanRenderer.bindTexture(RES_ENDERMAN_EYES);
    GlStateManager.enableBlend();
    GlStateManager.disableAlpha();
    GlStateManager.blendFunc(GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE);
    GlStateManager.disableLighting();
    GlStateManager.depthMask(!entitylivingbaseIn.isInvisible());
    int i = 61680;
    int j = 61680;
    int k = 0;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 61680.0F, 0.0F);
    GlStateManager.enableLighting();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.endermanRenderer.getMainModel().render(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
    this.endermanRenderer.setLightmap(entitylivingbaseIn, partialTicks);
    GlStateManager.depthMask(true);
    GlStateManager.disableBlend();
    GlStateManager.enableAlpha();
}
 
Example 17
Project: ExtraUtilities   File: EventHandlerServer.java   View source code 6 votes vote down vote up
@SubscribeEvent
public void magnumTorchDenyTeleport(final EnderTeleportEvent event) {
    if (event.entityLiving instanceof EntityEnderman && !((EntityEnderman)event.entityLiving).isScreaming()) {
        for (final int[] coord : EventHandlerServer.magnumTorchRegistry) {
            if (coord[0] == event.entity.worldObj.provider.dimensionId && event.entity.worldObj.blockExists(coord[1], coord[2], coord[3]) && event.entity.worldObj.getTileEntity(coord[1], coord[2], coord[3]) instanceof IAntiMobTorch) {
                final TileEntity tile = event.entity.worldObj.getTileEntity(coord[1], coord[2], coord[3]);
                final double dx = tile.xCoord + 0.5f - event.targetX;
                final double dy = tile.yCoord + 0.5f - event.targetY;
                final double dz = tile.zCoord + 0.5f - event.targetZ;
                if ((dx * dx + dz * dz) / ((IAntiMobTorch)tile).getHorizontalTorchRangeSquared() + dy * dy / ((IAntiMobTorch)tile).getVerticalTorchRangeSquared() > 1.0) {
                    continue;
                }
                final double dx2 = tile.xCoord + 0.5f - event.entity.posX;
                final double dy2 = tile.yCoord + 0.5f - event.entity.posY;
                final double dz2 = tile.zCoord + 0.5f - event.entity.posZ;
                if (dx * dx + dy * dy + dz * dz >= dx2 * dx2 + dy2 * dy2 + dz2 * dz2) {
                    continue;
                }
                event.setCanceled(true);
            }
        }
    }
}
 
Example 18
Project: ExtraUtilities   File: BlockEnderLily.java   View source code 6 votes vote down vote up
public void onEntityCollidedWithBlock(final World par1World, final int par2, final int par3, final int par4, final Entity par5Entity) {
    if (par1World.getBlockMetadata(par2, par3, par4) >= 3) {
        if (par5Entity instanceof EntityItem) {
            final ItemStack item = ((EntityItem)par5Entity).getEntityItem();
            if (item != null && (item.getItem() == this.getSeedItem() || item.getItem() == this.getCropItem())) {
                return;
            }
            if (par1World.isRemote) {
                par1World.spawnParticle("crit", par5Entity.posX, par5Entity.posY, par5Entity.posZ, 0.0, 0.0, 0.0);
            }
        }
        if (par5Entity instanceof EntityEnderman) {
            return;
        }
        par5Entity.attackEntityFrom(DamageSource.cactus, 0.1f);
    }
}
 
Example 19
Project: 4Space-5   File: ChunkProviderAsteroids.java   View source code 6 votes vote down vote up
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType, int i, int j, int k)
{
    if (par1EnumCreatureType == EnumCreatureType.monster)
    {
        final List monsters = new ArrayList();
        monsters.add(new SpawnListEntry(EntityEvolvedZombie.class, 3000, 1, 3));
        monsters.add(new SpawnListEntry(EntityEvolvedSpider.class, 2000, 1, 2));
        monsters.add(new SpawnListEntry(EntityEvolvedSkeleton.class, 1500, 1, 1));
        monsters.add(new SpawnListEntry(EntityEvolvedCreeper.class, 2000, 1, 1));
        if (ConfigManagerCore.challengeMode) monsters.add(new SpawnListEntry(EntityEnderman.class, 250, 1, 1));
        return monsters;
    }
    else
    {
        return null;
    }
}
 
Example 20
Project: CrystalMod   File: ModEntites.java   View source code 6 votes vote down vote up
public static void postInit(){
	addToBiomes(EntityCrystalPigZombie.class, 50, 1, 4, EnumCreatureType.MONSTER, getBiomesThatCanSpawn(EntityPigZombie.class, EnumCreatureType.MONSTER));
	addToBiomes(EntityCrystalCow.class, 6, 1, 4, EnumCreatureType.CREATURE, getBiomesThatCanSpawn(EntityCow.class, EnumCreatureType.CREATURE));
	addToBiomes(EntityCrystalEnderman.class, 8, 1, 4, EnumCreatureType.MONSTER, getBiomesThatCanSpawn(EntityEnderman.class, EnumCreatureType.MONSTER));
	
	List<Biome> angelBiomeList = getBiomesThatCanSpawn(EntityEnderman.class, EnumCreatureType.MONSTER);
	Biome hell = Biome.REGISTRY.getObject(new ResourceLocation("hell"));
	Biome sky = Biome.REGISTRY.getObject(new ResourceLocation("sky"));
	
	if(sky !=null){
		angelBiomeList.remove(sky);
	}
	
	if(hell !=null){
		angelBiomeList.remove(hell);
		List<Biome> listHell = Lists.newArrayList(hell);
		addToBiomes(EntityAngel.class, 50, 4, 4, EnumCreatureType.MONSTER, listHell);
		addToBiomes(EntityDevil.class, 50, 4, 4, EnumCreatureType.MONSTER, listHell);
	}
	
	addToBiomes(EntityAngel.class, 8, 1, 4, EnumCreatureType.MONSTER, angelBiomeList);
	addToBiomes(EntityDevil.class, 8, 1, 4, EnumCreatureType.MONSTER, angelBiomeList);
}
 
Example 21
Project: Restructured   File: MobControl.java   View source code 6 votes vote down vote up
public static void initialize() {
	setup(EnumCreatureType.AMBIENT, ModOptions.getMobSpawnAmbientFactor());
	setup(EnumCreatureType.CREATURE, ModOptions.getMobSpawnAnimalFactor());
	setup(EnumCreatureType.MONSTER, ModOptions.getMobSpawnMobFactor());
	setup(EnumCreatureType.WATER_CREATURE, ModOptions.getMobSpawnWaterFactor());

	if (BLOCK_CREEPER_BLOCK_DAMAGE || BLOCK_MOB_TREE_SPAWNING) {
		if (BLOCK_CREEPER_BLOCK_DAMAGE)
			ModLog.info("Blocking Creeper block damage");
		if (BLOCK_MOB_TREE_SPAWNING)
			ModLog.info("Blocking mob tree spawning");
		MinecraftForge.EVENT_BUS.register(new MobControl());
	}

	if (ModOptions.getBlockEndermanGriefing()) {
		try {
			final Field carriable = ReflectionHelper.findField(EntityEnderman.class, "carriable");
			if (carriable != null) {
				carriable.set(null, new IdentityHashMap<Block, Boolean>());
				ModLog.info("Blocking Enderman griefing");
			}
		} catch (final Exception ex) {
			ModLog.warn("Unable to access Enderman block table");
		}
	}
}
 
Example 22
Project: Kingdom-Keys-Re-Coded   File: DriveFormFinal.java   View source code 6 votes vote down vote up
@SubscribeEvent
public static void getXP(LivingDeathEvent event) {
	 if (!event.getEntity().world.isRemote && event.getEntity() instanceof EntityEnderman) { 
		 if (event.getSource().getTrueSource() instanceof EntityPlayer) {
            EntityPlayer player = (EntityPlayer) event.getSource().getTrueSource();
            IDriveState DRIVE = player.getCapability(ModCapabilities.DRIVE_STATE, null); 

            if(DRIVE.getActiveDriveName().equals(Strings.Form_Final)) {
            	DRIVE.setDriveExp(DRIVE.getActiveDriveName(), DRIVE.getDriveExp(DRIVE.getActiveDriveName())+1);
	          
	            int[] costs = DriveFormRegistry.get(DRIVE.getActiveDriveName()).getExpCosts();
	            int actualLevel = DRIVE.getDriveLevel(DRIVE.getActiveDriveName());
	            int actualExp = DRIVE.getDriveExp(DRIVE.getActiveDriveName());
	           
	            if(costs.length == 7 && actualLevel < 7) {
	            	if (actualExp >= costs[actualLevel]){
	            		System.out.println("LEVEL UP");
	            		DRIVE.setDriveLevel(DRIVE.getActiveDriveName(),actualLevel+1); 
	                    DRIVE.displayLevelUpMessage(player, DRIVE.getActiveDriveName());
	            	}
	            }
	            PacketDispatcher.sendTo(new SyncDriveData(DRIVE), (EntityPlayerMP) player);
			 }
		 }
	 }
}
 
Example 23
Project: Cyclic   File: MobDropChangesModule.java   View source code 6 votes vote down vote up
@SubscribeEvent
public void onLivingDropsEvent(LivingDropsEvent event) {
  Entity entity = event.getEntity();
  World world = entity.getEntityWorld();
  if (nameTagDeath) {
    if (entity.getCustomNameTag() != null && entity.getCustomNameTag() != "") {
      // item stack NBT needs the name enchanted onto it
      if (world.isRemote == false) {
        ItemStack nameTag = UtilNBT.buildEnchantedNametag(entity.getCustomNameTag());
        UtilItemStack.dropItemStackInWorld(world, entity.getPosition(), nameTag);
      }
    }
  }
  if (endermanDrop && entity instanceof EntityEnderman) {
    EntityEnderman mob = (EntityEnderman) entity;
    IBlockState bs = mob.getHeldBlockState();// mob.func_175489_ck();
    if (bs != null && bs.getBlock() != null && world.isRemote == false) {
      UtilItemStack.dropItemStackInWorld(world, mob.getPosition(), bs.getBlock());
    }
  }
}
 
Example 24
Project: ScottsTweaks   File: EnderDumper.java   View source code 6 votes vote down vote up
private static void dumpEnderman(EntityEnderman enderman, List<EntityItem> drops)
{
    final Settings settings = Settings.INSTANCE;

    if (settings.doEndermenDrops())
    {
        final Block block = enderman.func_146080_bZ();
        if (block.getMaterial().equals(Material.air)) return;

        final int metadata = enderman.getCarryingData();
        final ItemStack itemStack = new ItemStack(block.equals(Blocks.grass) ? Blocks.dirt : block, 1, metadata);

        final EntityItem entityItem =
                new EntityItem(enderman.worldObj, enderman.posX, enderman.posY, enderman.posZ, itemStack);
        drops.add(entityItem);
        enderman.func_146081_a(Blocks.air);
        enderman.setCarryingData(0);
    }
}
 
Example 25
Project: Resilience-Client-Source   File: RenderEnderman.java   View source code 6 votes vote down vote up
protected void renderEquippedItems(EntityEnderman par1EntityEnderman, float par2)
{
    super.renderEquippedItems(par1EntityEnderman, par2);

    if (par1EntityEnderman.func_146080_bZ().getMaterial() != Material.air)
    {
        GL11.glEnable(GL12.GL_RESCALE_NORMAL);
        GL11.glPushMatrix();
        float var3 = 0.5F;
        GL11.glTranslatef(0.0F, 0.6875F, -0.75F);
        var3 *= 1.0F;
        GL11.glRotatef(20.0F, 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
        GL11.glScalef(-var3, -var3, var3);
        int var4 = par1EntityEnderman.getBrightnessForRender(par2);
        int var5 = var4 % 65536;
        int var6 = var4 / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)var5 / 1.0F, (float)var6 / 1.0F);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        this.bindTexture(TextureMap.locationBlocksTexture);
        this.field_147909_c.renderBlockAsItem(par1EntityEnderman.func_146080_bZ(), par1EntityEnderman.getCarryingData(), 1.0F);
        GL11.glPopMatrix();
        GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    }
}
 
Example 26
Project: AdvancedRocketry   File: BiomeGenWatermelon.java   View source code 6 votes vote down vote up
public BiomeGenWatermelon(int biomeId, boolean register) {
	super(biomeId, register);
	
	//cold and dry
	
	enableRain = true;
	enableSnow = false;
	rootHeight=1f;
	heightVariation=0.1f;
	rainfall = 0f;
	temperature = 0.9f;
	this.theBiomeDecorator.generateLakes=false;
	this.theBiomeDecorator.flowersPerChunk=0;
	this.theBiomeDecorator.grassPerChunk=0;
	this.theBiomeDecorator.treesPerChunk=0;
	this.fillerBlock = this.topBlock = Blocks.melon_block;
	this.biomeName="Hot Dry Rock";
	
	this.spawnableMonsterList.clear();
	this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityEnderman.class, 10, 1, 10));
}
 
Example 27
Project: RidiculousWorld   File: BiomeGenMadness.java   View source code 6 votes vote down vote up
public BiomeGenMadness(int id)
{
    super(id);
    this.spawnableCreatureList.clear();
    this.theBiomeDecorator.treesPerChunk = -1;
    this.theBiomeDecorator.grassPerChunk = -1;
    this.theBiomeDecorator.mushroomsPerChunk = -1;
    this.topBlock = Blocks.packed_ice;
    this.fillerBlock = Blocks.packed_ice;
    this.spawnableCreatureList.clear();
    this.spawnableMonsterList.clear();
    this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 100, 4, 4));
    this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 100, 4, 4));
    this.spawnableMonsterList.add(new SpawnListEntry(EntityShoggoth.class, 90, 4, 4));
    this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityEnderman.class, 30, 1, 4));
    BiomeManager.addBiome(BiomeManager.BiomeType.ICY, new BiomeManager.BiomeEntry(this, Config.madnessWeight));
    BiomeManager.addBiome(BiomeManager.BiomeType.COOL, new BiomeManager.BiomeEntry(this, Config.madnessWeight));
    BiomeManager.addStrongholdBiome(this);
    BiomeDictionary.registerBiomeType(this, BiomeDictionary.Type.COLD, BiomeDictionary.Type.DEAD, BiomeDictionary.Type.MOUNTAIN, BiomeDictionary.Type.SNOWY);
    setBiomeName("Mountain of Madness");
    setTemperatureRainfall(0.05F, 0.5F);
    this.setHeight(BiomeGenBase.height_HighPlateaus);
    this.setColor(0x0E875B);
    this.waterColorMultiplier = 0x004A07;
}
 
Example 28
Project: GalacticraftPixelGalaxy   File: ChunkProviderGreenPixel.java   View source code 6 votes vote down vote up
@SuppressWarnings({"unchecked","rawtypes"}) 
@Override public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType,int i,int j,int k){
	  if (par1EnumCreatureType == EnumCreatureType.monster) 
	{
	    List monsters=new ArrayList();
	    monsters.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 8, 2, 3));
        monsters.add(new BiomeGenBase.SpawnListEntry(EntitySpider.class, 8, 2, 3));
        monsters.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 8, 2, 3));
        monsters.add(new BiomeGenBase.SpawnListEntry(EntityCreeper.class, 8, 2, 3));
        monsters.add(new BiomeGenBase.SpawnListEntry(EntityEnderman.class, 8, 1, 3));
        monsters.add(new BiomeGenBase.SpawnListEntry(EntityPixelOneSwingman.class, 1, 1, 1));
	    return monsters;
	}
	if (par1EnumCreatureType == EnumCreatureType.creature) 
	{
		List creatures=new ArrayList();
		creatures.add(new BiomeGenBase.SpawnListEntry(EntityhumanPixel.class, 8, 2, 3));
		creatures.add(new BiomeGenBase.SpawnListEntry(EntitypixelPig.class, 8, 1, 3));
		creatures.add(new BiomeGenBase.SpawnListEntry(EntitypixelCow.class, 8, 1, 3));
		return creatures;
		}
	  return null;
	}
 
Example 29
Project: D3Core   File: EventHandler.java   View source code 6 votes vote down vote up
@SubscribeEvent
public static void entityDeathEvent(LivingDropsEvent event)
{
    if (event.getEntityLiving() instanceof EntityPlayer && claysTortureMode)
    {
        event.setCanceled(true);
    }
    else if (event.getEntityLiving() instanceof EntityEnderman && EndermanGriefing.dropCarrying)
    {
        EntityEnderman entityEnderman = ((EntityEnderman) event.getEntityLiving());
        IBlockState state = entityEnderman.getHeldBlockState();
        if (state != null && state.getBlock() != Blocks.AIR)
        {
            ItemStack stack = new ItemStack(state.getBlock(), 1, state.getBlock().getMetaFromState(state));
            event.getDrops().add(new EntityItem(entityEnderman.world, entityEnderman.posX, entityEnderman.posY, entityEnderman.posZ, stack));
        }
    }
}
 
Example 30
Project: ExpandedRailsMod   File: RenderEnderman.java   View source code 6 votes vote down vote up
/**
 * Renders the desired {@code T} type Entity.
 */
public void doRender(EntityEnderman entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    IBlockState iblockstate = entity.getHeldBlockState();
    this.endermanModel.isCarrying = iblockstate != null;
    this.endermanModel.isAttacking = entity.isScreaming();

    if (entity.isScreaming())
    {
        double d0 = 0.02D;
        x += this.rnd.nextGaussian() * 0.02D;
        z += this.rnd.nextGaussian() * 0.02D;
    }

    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
 
Example 31
Project: ExpandedRailsMod   File: LayerHeldBlock.java   View source code 6 votes vote down vote up
public void doRenderLayer(EntityEnderman entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
    IBlockState iblockstate = entitylivingbaseIn.getHeldBlockState();

    if (iblockstate != null)
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.enableRescaleNormal();
        GlStateManager.pushMatrix();
        GlStateManager.translate(0.0F, 0.6875F, -0.75F);
        GlStateManager.rotate(20.0F, 1.0F, 0.0F, 0.0F);
        GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(0.25F, 0.1875F, 0.25F);
        float f = 0.5F;
        GlStateManager.scale(-0.5F, -0.5F, 0.5F);
        int i = entitylivingbaseIn.getBrightnessForRender(partialTicks);
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j, (float)k);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.endermanRenderer.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
        blockrendererdispatcher.renderBlockBrightness(iblockstate, 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.disableRescaleNormal();
    }
}
 
Example 32
Project: ExpandedRailsMod   File: LayerEndermanEyes.java   View source code 6 votes vote down vote up
public void doRenderLayer(EntityEnderman entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
    this.endermanRenderer.bindTexture(RES_ENDERMAN_EYES);
    GlStateManager.enableBlend();
    GlStateManager.disableAlpha();
    GlStateManager.blendFunc(GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE);
    GlStateManager.disableLighting();
    GlStateManager.depthMask(!entitylivingbaseIn.isInvisible());
    int i = 61680;
    int j = 61680;
    int k = 0;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 61680.0F, 0.0F);
    GlStateManager.enableLighting();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.endermanRenderer.getMainModel().render(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
    this.endermanRenderer.setLightmap(entitylivingbaseIn, partialTicks);
    GlStateManager.depthMask(true);
    GlStateManager.disableBlend();
    GlStateManager.enableAlpha();
}
 
Example 33
Project: Farrago   File: EntityBlunderbussProjectile.java   View source code 6 votes vote down vote up
@Override
protected void onImpact(MovingObjectPosition pos) {
	if (pos.entityHit instanceof EntityEnderman) return;
	if (pos.typeOfHit == MovingObjectType.BLOCK) {
		if (worldObj.getBlock(pos.blockX, pos.blockY, pos.blockZ).getMaterial().isReplaceable()) return;
	}
	setDead();
	if (!worldObj.isRemote) {
		if (pos.entityHit != null && pos.entityHit instanceof EntityLivingBase) {
			float min = (float)FarragoMod.config.getDouble("blunderbuss.damage.min");
			float max = (float)FarragoMod.config.getDouble("blunderbuss.damage.max");
			((EntityLivingBase)pos.entityHit).attackEntityFrom(new EntityDamageSourceIndirect("blunderbuss", this, getThrower()), (rand.nextFloat()*(max-min))+min);
			((EntityLivingBase)pos.entityHit).hurtResistantTime = 1;
		}
		if (worldObj instanceof WorldServer) {
			((WorldServer)worldObj).func_147487_a("smoke", pos.hitVec.xCoord, pos.hitVec.yCoord, pos.hitVec.zCoord, 1, 0.2f, 0.2f, 0.2f, 0f);
			((WorldServer)worldObj).playSoundAtEntity(this, "step.stone", 0.5f, 0.3f);
		}
	}
}
 
Example 34
Project: SecurityCraft   File: BlockFullMineBase.java   View source code 6 votes vote down vote up
/**
  * Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity
  */
public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity){
 	if(par1World.isRemote){
 		return;
 	}else{
 	
 		if(par5Entity instanceof EntityCreeper || par5Entity instanceof EntityOcelot || par5Entity instanceof EntityEnderman || par5Entity instanceof EntityItem){
 			return;
 		}else{
 			this.explode(par1World, par2, par3, par4);
 		}
 		
 	}
 
 	
 }
 
Example 35
Project: SecurityCraft   File: BlockMine.java   View source code 6 votes vote down vote up
/**
  * Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity
  */
public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity)
{
 	if(par1World.isRemote){
 		return;
 	}else{
 	
 		if(par5Entity instanceof EntityCreeper || par5Entity instanceof EntityOcelot || par5Entity instanceof EntityEnderman || par5Entity instanceof EntityItem){
 			return;
 		}else{
 			this.explode(par1World, par2, par3, par4);
 		}
 		
 	}
 
 	
}
 
Example 36
Project: Quantum-Anomalies   File: BiomeEndAnomaly.java   View source code 6 votes vote down vote up
public BiomeEndAnomaly(int id) {
    super(id);
    this.setBiomeName("End Anomaly");

    this.rootHeight = -1F;
    this.heightVariation = 3F;

    this.setColor(16711935);
    this.setDisableRain();

    this.func_76733_a(5470985).setTemperatureRainfall(0.9F, 1.0F);

    this.spawnableMonsterList.clear();
    this.spawnableCreatureList.clear();
    this.spawnableWaterCreatureList.clear();
    this.spawnableCaveCreatureList.clear();
    this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityEnderman.class, 10, 4, 4));
    this.topBlock = Blocks.end_stone;
    this.fillerBlock = Blocks.end_stone;
    this.theBiomeDecorator = new BiomeAnomalyDecorator();
}
 
Example 37
Project: Cauldron   File: RenderEnderman.java   View source code 6 votes vote down vote up
protected void renderEquippedItems(EntityEnderman p_77029_1_, float p_77029_2_)
{
    super.renderEquippedItems(p_77029_1_, p_77029_2_);

    if (p_77029_1_.func_146080_bZ().getMaterial() != Material.air)
    {
        GL11.glEnable(GL12.GL_RESCALE_NORMAL);
        GL11.glPushMatrix();
        float f1 = 0.5F;
        GL11.glTranslatef(0.0F, 0.6875F, -0.75F);
        f1 *= 1.0F;
        GL11.glRotatef(20.0F, 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
        GL11.glScalef(-f1, -f1, f1);
        int i = p_77029_1_.getBrightnessForRender(p_77029_2_);
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        this.bindTexture(TextureMap.locationBlocksTexture);
        this.field_147909_c.renderBlockAsItem(p_77029_1_.func_146080_bZ(), p_77029_1_.getCarryingData(), 1.0F);
        GL11.glPopMatrix();
        GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    }
}
 
Example 38
Project: Cauldron   File: RenderEnderman.java   View source code 6 votes vote down vote up
protected void renderEquippedItems(EntityEnderman p_77029_1_, float p_77029_2_)
{
    super.renderEquippedItems(p_77029_1_, p_77029_2_);

    if (p_77029_1_.func_146080_bZ().getMaterial() != Material.air)
    {
        GL11.glEnable(GL12.GL_RESCALE_NORMAL);
        GL11.glPushMatrix();
        float f1 = 0.5F;
        GL11.glTranslatef(0.0F, 0.6875F, -0.75F);
        f1 *= 1.0F;
        GL11.glRotatef(20.0F, 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
        GL11.glScalef(-f1, -f1, f1);
        int i = p_77029_1_.getBrightnessForRender(p_77029_2_);
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        this.bindTexture(TextureMap.locationBlocksTexture);
        this.field_147909_c.renderBlockAsItem(p_77029_1_.func_146080_bZ(), p_77029_1_.getCarryingData(), 1.0F);
        GL11.glPopMatrix();
        GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    }
}
 
Example 39
Project: ZeldaSwordSkills   File: ZSSItemEvents.java   View source code 6 votes vote down vote up
private static void init() {
	addDrop(EntityCreeper.class, SkillBase.armorBreak);
	addDrop(EntityIronGolem.class, SkillBase.armorBreak);
	addDrop(EntitySilverfish.class, SkillBase.dash);
	addDrop(EntityHorse.class, SkillBase.dash);
	addDrop(EntityEnderman.class, SkillBase.dodge);
	addDrop(EntityKeese.class, SkillBase.dodge);
	addDrop(EntitySpider.class, SkillBase.endingBlow);
	addDrop(EntityCaveSpider.class, SkillBase.leapingBlow);
	addDrop(EntityMagmaCube.class, SkillBase.leapingBlow);
	addDrop(EntityPigZombie.class, SkillBase.parry);
	addDrop(EntityOcelot.class, SkillBase.parry);
	addDrop(EntityOctorok.class, SkillBase.risingCut);
	addDrop(EntityBlaze.class, SkillBase.spinAttack);
	addDrop(EntityDarknut.class, SkillBase.spinAttack);
	addDrop(EntityZombie.class, SkillBase.swordBasic);
	addDrop(EntitySkeleton.class, SkillBase.swordBasic);
	addDrop(EntityGhast.class, SkillBase.swordBeam);
	addDrop(EntityWitch.class, SkillBase.swordBeam);
	addDrop(EntityWizzrobe.class, SkillBase.swordBreak);
}
 
Example 40
Project: RuneCraftery   File: RenderEnderman.java   View source code 6 votes vote down vote up
protected void func_77076_a(EntityEnderman p_77076_1_, float p_77076_2_) {
   super.func_77029_c(p_77076_1_, p_77076_2_);
   if(p_77076_1_.func_70822_p() > 0) {
      GL11.glEnable('\u803a');
      GL11.glPushMatrix();
      float var3 = 0.5F;
      GL11.glTranslatef(0.0F, 0.6875F, -0.75F);
      var3 *= 1.0F;
      GL11.glRotatef(20.0F, 1.0F, 0.0F, 0.0F);
      GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
      GL11.glScalef(-var3, -var3, var3);
      int var4 = p_77076_1_.func_70070_b(p_77076_2_);
      int var5 = var4 % 65536;
      int var6 = var4 / 65536;
      OpenGlHelper.func_77475_a(OpenGlHelper.field_77476_b, (float)var5 / 1.0F, (float)var6 / 1.0F);
      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
      this.func_110776_a(TextureMap.field_110575_b);
      this.field_76988_d.func_78600_a(Block.field_71973_m[p_77076_1_.func_70822_p()], p_77076_1_.func_70824_q(), 1.0F);
      GL11.glPopMatrix();
      GL11.glDisable('\u803a');
   }

}