Java Code Examples for net.minecraft.entity.monster.EntityZombie.isVillager()

The following are Jave code examples for showing how to use isVillager() of the net.minecraft.entity.monster.EntityZombie class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: Resilience-Client-Source   File: RenderZombie.java   View Source Code Vote up 6 votes
private void func_82427_a(EntityZombie par1EntityZombie)
{
    if (par1EntityZombie.isVillager())
    {
        if (this.field_82431_q != this.zombieVillagerModel.func_82897_a())
        {
            this.zombieVillagerModel = new ModelZombieVillager();
            this.field_82431_q = this.zombieVillagerModel.func_82897_a();
            this.field_82436_m = new ModelZombieVillager(1.0F, 0.0F, true);
            this.field_82433_n = new ModelZombieVillager(0.5F, 0.0F, true);
        }

        this.mainModel = this.zombieVillagerModel;
        this.field_82423_g = this.field_82436_m;
        this.field_82425_h = this.field_82433_n;
    }
    else
    {
        this.mainModel = this.field_82434_o;
        this.field_82423_g = this.field_82437_k;
        this.field_82425_h = this.field_82435_l;
    }

    this.modelBipedMain = (ModelBiped)this.mainModel;
}
 
Example 2
Project: Cauldron   File: RenderZombie.java   View Source Code Vote up 6 votes
private void func_82427_a(EntityZombie p_82427_1_)
{
    if (p_82427_1_.isVillager())
    {
        if (this.field_82431_q != this.zombieVillagerModel.func_82897_a())
        {
            this.zombieVillagerModel = new ModelZombieVillager();
            this.field_82431_q = this.zombieVillagerModel.func_82897_a();
            this.field_82436_m = new ModelZombieVillager(1.0F, 0.0F, true);
            this.field_82433_n = new ModelZombieVillager(0.5F, 0.0F, true);
        }

        this.mainModel = this.zombieVillagerModel;
        this.field_82423_g = this.field_82436_m;
        this.field_82425_h = this.field_82433_n;
    }
    else
    {
        this.mainModel = this.field_82434_o;
        this.field_82423_g = this.field_82437_k;
        this.field_82425_h = this.field_82435_l;
    }

    this.modelBipedMain = (ModelBiped)this.mainModel;
}
 
Example 3
Project: Cauldron   File: RenderZombie.java   View Source Code Vote up 6 votes
private void func_82427_a(EntityZombie p_82427_1_)
{
    if (p_82427_1_.isVillager())
    {
        if (this.field_82431_q != this.zombieVillagerModel.func_82897_a())
        {
            this.zombieVillagerModel = new ModelZombieVillager();
            this.field_82431_q = this.zombieVillagerModel.func_82897_a();
            this.field_82436_m = new ModelZombieVillager(1.0F, 0.0F, true);
            this.field_82433_n = new ModelZombieVillager(0.5F, 0.0F, true);
        }

        this.mainModel = this.zombieVillagerModel;
        this.field_82423_g = this.field_82436_m;
        this.field_82425_h = this.field_82433_n;
    }
    else
    {
        this.mainModel = this.field_82434_o;
        this.field_82423_g = this.field_82437_k;
        this.field_82425_h = this.field_82435_l;
    }

    this.modelBipedMain = (ModelBiped)this.mainModel;
}
 
Example 4
Project: RuneCraftery   File: RenderZombie.java   View Source Code Vote up 6 votes
private void func_82427_a(EntityZombie par1EntityZombie)
{
    if (par1EntityZombie.isVillager())
    {
        if (this.field_82431_q != this.zombieVillagerModel.func_82897_a())
        {
            this.zombieVillagerModel = new ModelZombieVillager();
            this.field_82431_q = this.zombieVillagerModel.func_82897_a();
            this.field_82436_m = new ModelZombieVillager(1.0F, 0.0F, true);
            this.field_82433_n = new ModelZombieVillager(0.5F, 0.0F, true);
        }

        this.mainModel = this.zombieVillagerModel;
        this.field_82423_g = this.field_82436_m;
        this.field_82425_h = this.field_82433_n;
    }
    else
    {
        this.mainModel = this.field_82434_o;
        this.field_82423_g = this.field_82437_k;
        this.field_82425_h = this.field_82435_l;
    }

    this.modelBipedMain = (ModelBiped)this.mainModel;
}
 
Example 5
Project: DecompiledMinecraft   File: RenderZombie.java   View Source Code Vote up 5 votes
private void func_82427_a(EntityZombie zombie)
{
    if (zombie.isVillager())
    {
        this.mainModel = this.zombieVillagerModel;
        this.layerRenderers = this.field_177121_n;
    }
    else
    {
        this.mainModel = this.field_82434_o;
        this.layerRenderers = this.field_177122_o;
    }

    this.modelBipedMain = (ModelBiped)this.mainModel;
}
 
Example 6
Project: BaseClient   File: RenderZombie.java   View Source Code Vote up 5 votes
private void func_82427_a(EntityZombie zombie)
{
    if (zombie.isVillager())
    {
        this.mainModel = this.zombieVillagerModel;
        this.layerRenderers = this.field_177121_n;
    }
    else
    {
        this.mainModel = this.field_82434_o;
        this.layerRenderers = this.field_177122_o;
    }

    this.modelBipedMain = (ModelBiped)this.mainModel;
}
 
Example 7
Project: BaseClient   File: RenderZombie.java   View Source Code Vote up 5 votes
private void func_82427_a(EntityZombie zombie)
{
    if (zombie.isVillager())
    {
        this.mainModel = this.zombieVillagerModel;
        this.layerRenderers = this.field_177121_n;
    }
    else
    {
        this.mainModel = this.field_82434_o;
        this.layerRenderers = this.field_177122_o;
    }

    this.modelBipedMain = (ModelBiped)this.mainModel;
}
 
Example 8
Project: connor41-etfuturum2   File: ServerEventHandler.java   View Source Code Vote up 5 votes
@SubscribeEvent
public void livingUpdate(LivingUpdateEvent event) {
	ModEnchantments.onLivingUpdate(event.entityLiving);

	if (EtFuturum.enableVillagerZombies)
		if (!event.entityLiving.worldObj.isRemote && event.entityLiving.getClass() == EntityZombie.class) {
			EntityZombie zombie = (EntityZombie) event.entityLiving;
			if (zombie.isVillager()) {
				EntityZombieVillager villagerZombie = new EntityZombieVillager(zombie.worldObj);
				villagerZombie.copyLocationAndAnglesFrom(zombie);
				villagerZombie.onSpawnWithEgg(null);
				villagerZombie.worldObj.spawnEntityInWorld(villagerZombie);

				zombie.setDead();
			}
		}

	if (EtFuturum.enableShearableGolems)
		if (!event.entityLiving.worldObj.isRemote && event.entityLiving.getClass() == EntitySnowman.class) {
			EntityNewSnowGolem golen = new EntityNewSnowGolem(event.entityLiving.worldObj);
			golen.copyLocationAndAnglesFrom(event.entityLiving);
			golen.onSpawnWithEgg(null);
			golen.worldObj.spawnEntityInWorld(golen);

			event.entityLiving.setDead();
		}
}
 
Example 9
Project: CustomWorldGen   File: RenderZombie.java   View Source Code Vote up 5 votes
/**
 * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
 */
protected ResourceLocation getEntityTexture(EntityZombie entity)
{
    if (entity.isVillager())
    {
        return entity.getVillagerTypeForge().getZombieSkin();
    }
    else
    {
        return entity.getZombieType() == ZombieType.HUSK ? HUSK_ZOMBIE_TEXTURES : ZOMBIE_TEXTURES;
    }
}
 
Example 10
Project: CustomWorldGen   File: RenderZombie.java   View Source Code Vote up 5 votes
private void swapArmor(EntityZombie zombie)
{
    if (zombie.isVillager())
    {
        this.mainModel = this.zombieVillagerModel;
        this.layerRenderers = this.villagerLayers;
    }
    else
    {
        this.mainModel = this.defaultModel;
        this.layerRenderers = this.defaultLayers;
    }

    this.modelBipedMain = (ModelBiped)this.mainModel;
}
 
Example 11
Project: Et-Futurum   File: ServerEventHandler.java   View Source Code Vote up 5 votes
@SubscribeEvent
public void livingUpdate(LivingUpdateEvent event) {
	ModEnchantments.onLivingUpdate(event.entityLiving);

	if (EtFuturum.enableVillagerZombies)
		if (!event.entityLiving.worldObj.isRemote && event.entityLiving.getClass() == EntityZombie.class) {
			EntityZombie zombie = (EntityZombie) event.entityLiving;
			if (zombie.isVillager()) {
				EntityZombieVillager villagerZombie = new EntityZombieVillager(zombie.worldObj);
				villagerZombie.copyLocationAndAnglesFrom(zombie);
				villagerZombie.onSpawnWithEgg(null);
				villagerZombie.worldObj.spawnEntityInWorld(villagerZombie);

				zombie.setDead();
			}
		}

	if (EtFuturum.enableShearableGolems)
		if (!event.entityLiving.worldObj.isRemote && event.entityLiving.getClass() == EntitySnowman.class) {
			EntityNewSnowGolem golen = new EntityNewSnowGolem(event.entityLiving.worldObj);
			golen.copyLocationAndAnglesFrom(event.entityLiving);
			golen.onSpawnWithEgg(null);
			golen.worldObj.spawnEntityInWorld(golen);

			event.entityLiving.setDead();
		}
}
 
Example 12
Project: ExpandedRailsMod   File: RenderZombie.java   View Source Code Vote up 5 votes
/**
 * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
 */
protected ResourceLocation getEntityTexture(EntityZombie entity)
{
    if (entity.isVillager())
    {
        return entity.getVillagerTypeForge().getZombieSkin();
    }
    else
    {
        return entity.func_189777_di() == ZombieType.HUSK ? field_190086_r : ZOMBIE_TEXTURES;
    }
}
 
Example 13
Project: ExpandedRailsMod   File: RenderZombie.java   View Source Code Vote up 5 votes
private void swapArmor(EntityZombie zombie)
{
    if (zombie.isVillager())
    {
        this.mainModel = this.zombieVillagerModel;
        this.layerRenderers = this.villagerLayers;
    }
    else
    {
        this.mainModel = this.defaultModel;
        this.layerRenderers = this.defaultLayers;
    }

    this.modelBipedMain = (ModelBiped)this.mainModel;
}
 
Example 14
Project: Corundum   File: HumanZombie.java   View Source Code Vote up 5 votes
@Override
public I fromMC(EntityZombie entityMC) {
    if (!entityMC.isVillager())
        return (I) new Zombie(entityMC);
    else
        return (I) new ZombifiedVillager(entityMC);
}
 
Example 15
Project: DecompiledMinecraft   File: RenderZombie.java   View Source Code Vote up 4 votes
/**
 * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
 */
protected ResourceLocation getEntityTexture(EntityZombie entity)
{
    return entity.isVillager() ? zombieVillagerTextures : zombieTextures;
}
 
Example 16
Project: BaseClient   File: RenderZombie.java   View Source Code Vote up 4 votes
/**
 * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
 */
protected ResourceLocation getEntityTexture(EntityZombie entity)
{
    return entity.isVillager() ? zombieVillagerTextures : zombieTextures;
}
 
Example 17
Project: BaseClient   File: RenderZombie.java   View Source Code Vote up 4 votes
/**
 * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
 */
protected ResourceLocation getEntityTexture(EntityZombie entity)
{
    return entity.isVillager() ? zombieVillagerTextures : zombieTextures;
}
 
Example 18
Project: Resilience-Client-Source   File: RenderZombie.java   View Source Code Vote up 4 votes
/**
 * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
 */
protected ResourceLocation getEntityTexture(EntityZombie par1EntityZombie)
{
    return par1EntityZombie instanceof EntityPigZombie ? zombiePigmanTextures : (par1EntityZombie.isVillager() ? zombieVillagerTextures : zombieTextures);
}
 
Example 19
Project: Cauldron   File: RenderZombie.java   View Source Code Vote up 4 votes
protected ResourceLocation getEntityTexture(EntityZombie p_110775_1_)
{
    return p_110775_1_ instanceof EntityPigZombie ? zombiePigmanTextures : (p_110775_1_.isVillager() ? zombieVillagerTextures : zombieTextures);
}
 
Example 20
Project: Cauldron   File: RenderZombie.java   View Source Code Vote up 4 votes
protected ResourceLocation getEntityTexture(EntityZombie p_110775_1_)
{
    return p_110775_1_ instanceof EntityPigZombie ? zombiePigmanTextures : (p_110775_1_.isVillager() ? zombieVillagerTextures : zombieTextures);
}
 
Example 21
Project: RuneCraftery   File: RenderZombie.java   View Source Code Vote up 4 votes
protected ResourceLocation func_110863_a(EntityZombie par1EntityZombie)
{
    return par1EntityZombie instanceof EntityPigZombie ? zombiePigmanTextures : (par1EntityZombie.isVillager() ? zombieVillagerTextures : zombieTextures);
}