Java 类net.minecraft.entity.monster.EntityIronGolem 实例源码
项目:DecompiledMinecraft
文件:LayerIronGolemFlower.java
public void doRenderLayer(EntityIronGolem 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)
{
if (entitylivingbaseIn.getHoldRoseTick() != 0)
{
BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
GlStateManager.enableRescaleNormal();
GlStateManager.pushMatrix();
GlStateManager.rotate(5.0F + 180.0F * ((ModelIronGolem)this.ironGolemRenderer.getMainModel()).ironGolemRightArm.rotateAngleX / (float)Math.PI, 1.0F, 0.0F, 0.0F);
GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
GlStateManager.translate(-0.9375F, -0.625F, -0.9375F);
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.ironGolemRenderer.bindTexture(TextureMap.locationBlocksTexture);
blockrendererdispatcher.renderBlockBrightness(Blocks.red_flower.getDefaultState(), 1.0F);
GlStateManager.popMatrix();
GlStateManager.disableRescaleNormal();
}
}
项目:BaseClient
文件:LayerIronGolemFlower.java
public void doRenderLayer(EntityIronGolem 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)
{
if (entitylivingbaseIn.getHoldRoseTick() != 0)
{
BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
GlStateManager.enableRescaleNormal();
GlStateManager.pushMatrix();
GlStateManager.rotate(5.0F + 180.0F * ((ModelIronGolem)this.ironGolemRenderer.getMainModel()).ironGolemRightArm.rotateAngleX / (float)Math.PI, 1.0F, 0.0F, 0.0F);
GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
GlStateManager.translate(-0.9375F, -0.625F, -0.9375F);
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.ironGolemRenderer.bindTexture(TextureMap.locationBlocksTexture);
blockrendererdispatcher.renderBlockBrightness(Blocks.red_flower.getDefaultState(), 1.0F);
GlStateManager.popMatrix();
GlStateManager.disableRescaleNormal();
}
}
项目:BaseClient
文件:LayerIronGolemFlower.java
public void doRenderLayer(EntityIronGolem 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)
{
if (entitylivingbaseIn.getHoldRoseTick() != 0)
{
BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
GlStateManager.enableRescaleNormal();
GlStateManager.pushMatrix();
GlStateManager.rotate(5.0F + 180.0F * ((ModelIronGolem)this.ironGolemRenderer.getMainModel()).ironGolemRightArm.rotateAngleX / (float)Math.PI, 1.0F, 0.0F, 0.0F);
GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
GlStateManager.translate(-0.9375F, -0.625F, -0.9375F);
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.ironGolemRenderer.bindTexture(TextureMap.locationBlocksTexture);
blockrendererdispatcher.renderBlockBrightness(Blocks.red_flower.getDefaultState(), 1.0F);
GlStateManager.popMatrix();
GlStateManager.disableRescaleNormal();
}
}
项目:Backmemed
文件:LayerIronGolemFlower.java
public void doRenderLayer(EntityIronGolem entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
if (entitylivingbaseIn.getHoldRoseTick() != 0)
{
BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
GlStateManager.enableRescaleNormal();
GlStateManager.pushMatrix();
GlStateManager.rotate(5.0F + 180.0F * ((ModelIronGolem)this.ironGolemRenderer.getMainModel()).ironGolemRightArm.rotateAngleX / (float)Math.PI, 1.0F, 0.0F, 0.0F);
GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
GlStateManager.translate(-0.9375F, -0.625F, -0.9375F);
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.ironGolemRenderer.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
blockrendererdispatcher.renderBlockBrightness(Blocks.RED_FLOWER.getDefaultState(), 1.0F);
GlStateManager.popMatrix();
GlStateManager.disableRescaleNormal();
}
}
项目:CustomWorldGen
文件:LayerIronGolemFlower.java
public void doRenderLayer(EntityIronGolem entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
if (entitylivingbaseIn.getHoldRoseTick() != 0)
{
BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
GlStateManager.enableRescaleNormal();
GlStateManager.pushMatrix();
GlStateManager.rotate(5.0F + 180.0F * ((ModelIronGolem)this.ironGolemRenderer.getMainModel()).ironGolemRightArm.rotateAngleX / (float)Math.PI, 1.0F, 0.0F, 0.0F);
GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
GlStateManager.translate(-0.9375F, -0.625F, -0.9375F);
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.ironGolemRenderer.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
blockrendererdispatcher.renderBlockBrightness(Blocks.RED_FLOWER.getDefaultState(), 1.0F);
GlStateManager.popMatrix();
GlStateManager.disableRescaleNormal();
}
}
项目:Resilience-Client-Source
文件:RenderIronGolem.java
protected void renderEquippedItems(EntityIronGolem par1EntityIronGolem, float par2)
{
super.renderEquippedItems(par1EntityIronGolem, par2);
if (par1EntityIronGolem.getHoldRoseTick() != 0)
{
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPushMatrix();
GL11.glRotatef(5.0F + 180.0F * this.ironGolemModel.ironGolemRightArm.rotateAngleX / (float)Math.PI, 1.0F, 0.0F, 0.0F);
GL11.glTranslatef(-0.6875F, 1.25F, -0.9375F);
GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
float var3 = 0.8F;
GL11.glScalef(var3, -var3, var3);
int var4 = par1EntityIronGolem.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(Blocks.red_flower, 0, 1.0F);
GL11.glPopMatrix();
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
}
}
项目:ExpandedRailsMod
文件:LayerIronGolemFlower.java
public void doRenderLayer(EntityIronGolem entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
if (entitylivingbaseIn.getHoldRoseTick() != 0)
{
BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
GlStateManager.enableRescaleNormal();
GlStateManager.pushMatrix();
GlStateManager.rotate(5.0F + 180.0F * ((ModelIronGolem)this.ironGolemRenderer.getMainModel()).ironGolemRightArm.rotateAngleX / (float)Math.PI, 1.0F, 0.0F, 0.0F);
GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
GlStateManager.translate(-0.9375F, -0.625F, -0.9375F);
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.ironGolemRenderer.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
blockrendererdispatcher.renderBlockBrightness(Blocks.RED_FLOWER.getDefaultState(), 1.0F);
GlStateManager.popMatrix();
GlStateManager.disableRescaleNormal();
}
}
项目:Cauldron
文件:RenderIronGolem.java
protected void renderEquippedItems(EntityIronGolem p_77029_1_, float p_77029_2_)
{
super.renderEquippedItems(p_77029_1_, p_77029_2_);
if (p_77029_1_.getHoldRoseTick() != 0)
{
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPushMatrix();
GL11.glRotatef(5.0F + 180.0F * this.ironGolemModel.ironGolemRightArm.rotateAngleX / (float)Math.PI, 1.0F, 0.0F, 0.0F);
GL11.glTranslatef(-0.6875F, 1.25F, -0.9375F);
GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
float f1 = 0.8F;
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(Blocks.red_flower, 0, 1.0F);
GL11.glPopMatrix();
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
}
}
项目:Cauldron
文件:ModelIronGolem.java
public void setLivingAnimations(EntityLivingBase p_78086_1_, float p_78086_2_, float p_78086_3_, float p_78086_4_)
{
EntityIronGolem entityirongolem = (EntityIronGolem)p_78086_1_;
int i = entityirongolem.getAttackTimer();
if (i > 0)
{
this.ironGolemRightArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float)i - p_78086_4_, 10.0F);
this.ironGolemLeftArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float)i - p_78086_4_, 10.0F);
}
else
{
int j = entityirongolem.getHoldRoseTick();
if (j > 0)
{
this.ironGolemRightArm.rotateAngleX = -0.8F + 0.025F * this.func_78172_a((float)j, 70.0F);
this.ironGolemLeftArm.rotateAngleX = 0.0F;
}
else
{
this.ironGolemRightArm.rotateAngleX = (-0.2F + 1.5F * this.func_78172_a(p_78086_2_, 13.0F)) * p_78086_3_;
this.ironGolemLeftArm.rotateAngleX = (-0.2F - 1.5F * this.func_78172_a(p_78086_2_, 13.0F)) * p_78086_3_;
}
}
}
项目:Cauldron
文件:RenderIronGolem.java
protected void renderEquippedItems(EntityIronGolem p_77029_1_, float p_77029_2_)
{
super.renderEquippedItems(p_77029_1_, p_77029_2_);
if (p_77029_1_.getHoldRoseTick() != 0)
{
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPushMatrix();
GL11.glRotatef(5.0F + 180.0F * this.ironGolemModel.ironGolemRightArm.rotateAngleX / (float)Math.PI, 1.0F, 0.0F, 0.0F);
GL11.glTranslatef(-0.6875F, 1.25F, -0.9375F);
GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
float f1 = 0.8F;
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(Blocks.red_flower, 0, 1.0F);
GL11.glPopMatrix();
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
}
}
项目:Cauldron
文件:ModelIronGolem.java
public void setLivingAnimations(EntityLivingBase p_78086_1_, float p_78086_2_, float p_78086_3_, float p_78086_4_)
{
EntityIronGolem entityirongolem = (EntityIronGolem)p_78086_1_;
int i = entityirongolem.getAttackTimer();
if (i > 0)
{
this.ironGolemRightArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float)i - p_78086_4_, 10.0F);
this.ironGolemLeftArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float)i - p_78086_4_, 10.0F);
}
else
{
int j = entityirongolem.getHoldRoseTick();
if (j > 0)
{
this.ironGolemRightArm.rotateAngleX = -0.8F + 0.025F * this.func_78172_a((float)j, 70.0F);
this.ironGolemLeftArm.rotateAngleX = 0.0F;
}
else
{
this.ironGolemRightArm.rotateAngleX = (-0.2F + 1.5F * this.func_78172_a(p_78086_2_, 13.0F)) * p_78086_3_;
this.ironGolemLeftArm.rotateAngleX = (-0.2F - 1.5F * this.func_78172_a(p_78086_2_, 13.0F)) * p_78086_3_;
}
}
}
项目:ZeldaSwordSkills
文件:ZSSItemEvents.java
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);
}
项目:RuneCraftery
文件:EntityAIFollowGolem.java
public boolean func_75250_a() {
if(this.field_75294_a.func_70874_b() >= 0) {
return false;
} else if(!this.field_75294_a.field_70170_p.func_72935_r()) {
return false;
} else {
List var1 = this.field_75294_a.field_70170_p.func_72872_a(EntityIronGolem.class, this.field_75294_a.field_70121_D.func_72314_b(6.0D, 2.0D, 6.0D));
if(var1.isEmpty()) {
return false;
} else {
Iterator var2 = var1.iterator();
while(var2.hasNext()) {
EntityIronGolem var3 = (EntityIronGolem)var2.next();
if(var3.func_70853_p() > 0) {
this.field_75292_b = var3;
break;
}
}
return this.field_75292_b != null;
}
}
}
项目:RuneCraftery
文件:Village.java
public void func_75560_a(int p_75560_1_) {
this.field_75581_g = p_75560_1_;
this.func_75557_k();
this.func_75565_j();
if(p_75560_1_ % 20 == 0) {
this.func_75572_i();
}
if(p_75560_1_ % 30 == 0) {
this.func_75579_h();
}
int var2 = this.field_75588_h / 10;
if(this.field_75587_j < var2 && this.field_75584_b.size() > 20 && this.field_75586_a.field_73012_v.nextInt(7000) == 0) {
Vec3 var3 = this.func_75559_a(MathHelper.func_76141_d((float)this.field_75582_d.field_71574_a), MathHelper.func_76141_d((float)this.field_75582_d.field_71572_b), MathHelper.func_76141_d((float)this.field_75582_d.field_71573_c), 2, 4, 2);
if(var3 != null) {
EntityIronGolem var4 = new EntityIronGolem(this.field_75586_a);
var4.func_70107_b(var3.field_72450_a, var3.field_72448_b, var3.field_72449_c);
this.field_75586_a.func_72838_d(var4);
++this.field_75587_j;
}
}
}
项目:RuneCraftery
文件:RenderIronGolem.java
protected void func_77047_a(EntityIronGolem p_77047_1_, float p_77047_2_) {
super.func_77029_c(p_77047_1_, p_77047_2_);
if(p_77047_1_.func_70853_p() != 0) {
GL11.glEnable('\u803a');
GL11.glPushMatrix();
GL11.glRotatef(5.0F + 180.0F * this.field_77050_a.field_78177_c.field_78795_f / 3.1415927F, 1.0F, 0.0F, 0.0F);
GL11.glTranslatef(-0.6875F, 1.25F, -0.9375F);
GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
float var3 = 0.8F;
GL11.glScalef(var3, -var3, var3);
int var4 = p_77047_1_.func_70070_b(p_77047_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_72107_ae, 0, 1.0F);
GL11.glPopMatrix();
GL11.glDisable('\u803a');
}
}
项目:RuneCraftery
文件:ModelIronGolem.java
public void func_78086_a(EntityLivingBase p_78086_1_, float p_78086_2_, float p_78086_3_, float p_78086_4_) {
EntityIronGolem var5 = (EntityIronGolem)p_78086_1_;
int var6 = var5.func_70854_o();
if(var6 > 0) {
this.field_78177_c.field_78795_f = -2.0F + 1.5F * this.func_78172_a((float)var6 - p_78086_4_, 10.0F);
this.field_78174_d.field_78795_f = -2.0F + 1.5F * this.func_78172_a((float)var6 - p_78086_4_, 10.0F);
} else {
int var7 = var5.func_70853_p();
if(var7 > 0) {
this.field_78177_c.field_78795_f = -0.8F + 0.025F * this.func_78172_a((float)var7, 70.0F);
this.field_78174_d.field_78795_f = 0.0F;
} else {
this.field_78177_c.field_78795_f = (-0.2F + 1.5F * this.func_78172_a(p_78086_2_, 13.0F)) * p_78086_3_;
this.field_78174_d.field_78795_f = (-0.2F - 1.5F * this.func_78172_a(p_78086_2_, 13.0F)) * p_78086_3_;
}
}
}
项目:RuneCraftery
文件:RenderIronGolem.java
/**
* Renders Iron Golem Equipped items.
*/
protected void renderIronGolemEquippedItems(EntityIronGolem par1EntityIronGolem, float par2)
{
super.renderEquippedItems(par1EntityIronGolem, par2);
if (par1EntityIronGolem.getHoldRoseTick() != 0)
{
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPushMatrix();
GL11.glRotatef(5.0F + 180.0F * this.ironGolemModel.ironGolemRightArm.rotateAngleX / (float)Math.PI, 1.0F, 0.0F, 0.0F);
GL11.glTranslatef(-0.6875F, 1.25F, -0.9375F);
GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
float f1 = 0.8F;
GL11.glScalef(f1, -f1, f1);
int i = par1EntityIronGolem.getBrightnessForRender(par2);
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);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.bindTexture(TextureMap.locationBlocksTexture);
this.renderBlocks.renderBlockAsItem(Block.plantRed, 0, 1.0F);
GL11.glPopMatrix();
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
}
}
项目:BetterNutritionMod
文件:RenderIronGolem.java
/**
* Renders Iron Golem Equipped items.
*/
protected void renderIronGolemEquippedItems(EntityIronGolem par1EntityIronGolem, float par2)
{
super.renderEquippedItems(par1EntityIronGolem, par2);
if (par1EntityIronGolem.getHoldRoseTick() != 0)
{
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPushMatrix();
GL11.glRotatef(5.0F + 180.0F * this.ironGolemModel.ironGolemRightArm.rotateAngleX / (float)Math.PI, 1.0F, 0.0F, 0.0F);
GL11.glTranslatef(-0.6875F, 1.25F, -0.9375F);
GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
float f1 = 0.8F;
GL11.glScalef(f1, -f1, f1);
int i = par1EntityIronGolem.getBrightnessForRender(par2);
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);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.bindTexture(TextureMap.locationBlocksTexture);
this.renderBlocks.renderBlockAsItem(Block.plantRed, 0, 1.0F);
GL11.glPopMatrix();
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
}
}
项目:minecraftmod-golemworld
文件:GolemWorldEventHooks.java
/**
* Listens to an {@link EntityJoinWorldEvent} and responds depending on the
* type of entity that spawned. This code effectively disables the vanilla
* iron golem by replacing it with one of our golems if it spawns naturally,
* i.e. in a village, or dropping the blocks used to build it if it was
* built manually. Configurable.
*
* @param e the {@link EntityJoinWorldEvent}
*/
@ForgeSubscribe
public void onEntityJoinWorld(EntityJoinWorldEvent e) {
// This code effectively disables the vanilla iron golem by replacing it
// with one of our golems if it spawns naturally, i.e. in a village, or
// dropping the blocks used to build it if it was built manually.
// Configurable.
if (!e.world.isRemote && e.entity.getClass() == EntityIronGolem.class) {
EntityIronGolem theGolem = (EntityIronGolem) e.entity;
theGolem.worldObj.removeEntity(theGolem);
if(theGolem.isPlayerCreated()){
GolemRegistry.spawnGolem("iron golem", theGolem.worldObj, theGolem.posX, theGolem.posY, theGolem.posZ).setCreator(theGolem.isPlayerCreated()?"$unknown$":null);
}else{
GolemRegistry.spawnRandomVillageGolem(theGolem.worldObj, theGolem.posX, theGolem.posY, theGolem.posZ);
}
}
}
项目:VillagerTweaks
文件:LayerIronGolemDamage.java
public void doRenderDamageLayer(EntityIronGolem entity, float p_177145_2_, float p_177145_3_, float p_177145_4_, float p_177145_5_, float p_177145_6_, float p_177145_7_, float p_177145_8_)
{
if (!entity.isInvisible()) {
// Gets the golem percentage life left
EnumGolemHealth healthStatus = EnumGolemHealth.getGolemHealth(entity);
if (healthStatus == EnumGolemHealth.DAMAGED) {
this.golemRender.bindTexture(golemLittleDamage);
this.golemRender.getMainModel().render(entity, p_177145_2_, p_177145_3_, p_177145_5_, p_177145_6_, p_177145_7_, p_177145_8_);
} else if (healthStatus == EnumGolemHealth.HIGHLY_DAMAGED) {
this.golemRender.bindTexture(golemBigDamage);
this.golemRender.getMainModel().render(entity, p_177145_2_, p_177145_3_, p_177145_5_, p_177145_6_, p_177145_7_, p_177145_8_);
}
}
}
项目:harshencastle
文件:HandlerIronHeartDrop.java
@SubscribeEvent
public void livingDrop(LivingDropsEvent event)
{
Vec3d vec = new Vec3d(event.getEntityLiving().getPosition());
if(event.getEntity() instanceof EntityIronGolem)
{
List<ItemStack> stackList = HarshenUtils.getItemsFromLootTable(event.getEntity().world, HarshenLootTables.golemDrops);
if(stackList.size() == 1)
event.getDrops().add(new EntityItem(event.getEntity().world, vec.x, vec.y, vec.z, stackList.get(0)));
}
}
项目:ForgeHax
文件:EntityUtils.java
/**
* If the mob is friendly (not aggressive)
*/
public static boolean isFriendlyMob(Entity entity) {
return (entity.isCreatureType(EnumCreatureType.CREATURE, false) && !EntityUtils.isNeutralMob(entity)) ||
(entity.isCreatureType(EnumCreatureType.AMBIENT, false) && !isBatsDisabled) ||
entity instanceof EntityVillager ||
entity instanceof EntityIronGolem ||
(isNeutralMob(entity) && !EntityUtils.isMobAggressive(entity));
}
项目:DecompiledMinecraft
文件:EntityAIFollowGolem.java
/**
* Returns whether the EntityAIBase should begin execution.
*/
public boolean shouldExecute()
{
if (this.theVillager.getGrowingAge() >= 0)
{
return false;
}
else if (!this.theVillager.worldObj.isDaytime())
{
return false;
}
else
{
List<EntityIronGolem> list = this.theVillager.worldObj.<EntityIronGolem>getEntitiesWithinAABB(EntityIronGolem.class, this.theVillager.getEntityBoundingBox().expand(6.0D, 2.0D, 6.0D));
if (list.isEmpty())
{
return false;
}
else
{
for (EntityIronGolem entityirongolem : list)
{
if (entityirongolem.getHoldRoseTick() > 0)
{
this.theGolem = entityirongolem;
break;
}
}
return this.theGolem != null;
}
}
}
项目:DecompiledMinecraft
文件:Village.java
/**
* Called periodically by VillageCollection
*/
public void tick(int p_75560_1_)
{
this.tickCounter = p_75560_1_;
this.removeDeadAndOutOfRangeDoors();
this.removeDeadAndOldAgressors();
if (p_75560_1_ % 20 == 0)
{
this.updateNumVillagers();
}
if (p_75560_1_ % 30 == 0)
{
this.updateNumIronGolems();
}
int i = this.numVillagers / 10;
if (this.numIronGolems < i && this.villageDoorInfoList.size() > 20 && this.worldObj.rand.nextInt(7000) == 0)
{
Vec3 vec3 = this.func_179862_a(this.center, 2, 4, 2);
if (vec3 != null)
{
EntityIronGolem entityirongolem = new EntityIronGolem(this.worldObj);
entityirongolem.setPosition(vec3.xCoord, vec3.yCoord, vec3.zCoord);
this.worldObj.spawnEntityInWorld(entityirongolem);
++this.numIronGolems;
}
}
}
项目:DecompiledMinecraft
文件:EntityAIFollowGolem.java
/**
* Returns whether the EntityAIBase should begin execution.
*/
public boolean shouldExecute()
{
if (this.theVillager.getGrowingAge() >= 0)
{
return false;
}
else if (!this.theVillager.worldObj.isDaytime())
{
return false;
}
else
{
List<EntityIronGolem> list = this.theVillager.worldObj.<EntityIronGolem>getEntitiesWithinAABB(EntityIronGolem.class, this.theVillager.getEntityBoundingBox().expand(6.0D, 2.0D, 6.0D));
if (list.isEmpty())
{
return false;
}
else
{
for (EntityIronGolem entityirongolem : list)
{
if (entityirongolem.getHoldRoseTick() > 0)
{
this.theGolem = entityirongolem;
break;
}
}
return this.theGolem != null;
}
}
}
项目:DecompiledMinecraft
文件:Village.java
/**
* Called periodically by VillageCollection
*/
public void tick(int p_75560_1_)
{
this.tickCounter = p_75560_1_;
this.removeDeadAndOutOfRangeDoors();
this.removeDeadAndOldAgressors();
if (p_75560_1_ % 20 == 0)
{
this.updateNumVillagers();
}
if (p_75560_1_ % 30 == 0)
{
this.updateNumIronGolems();
}
int i = this.numVillagers / 10;
if (this.numIronGolems < i && this.villageDoorInfoList.size() > 20 && this.worldObj.rand.nextInt(7000) == 0)
{
Vec3 vec3 = this.func_179862_a(this.center, 2, 4, 2);
if (vec3 != null)
{
EntityIronGolem entityirongolem = new EntityIronGolem(this.worldObj);
entityirongolem.setPosition(vec3.xCoord, vec3.yCoord, vec3.zCoord);
this.worldObj.spawnEntityInWorld(entityirongolem);
++this.numIronGolems;
}
}
}
项目:DecompiledMinecraft
文件:RenderIronGolem.java
protected void rotateCorpse(EntityIronGolem bat, float p_77043_2_, float p_77043_3_, float partialTicks)
{
super.rotateCorpse(bat, p_77043_2_, p_77043_3_, partialTicks);
if ((double)bat.limbSwingAmount >= 0.01D)
{
float f = 13.0F;
float f1 = bat.limbSwing - bat.limbSwingAmount * (1.0F - partialTicks) + 6.0F;
float f2 = (Math.abs(f1 % f - f * 0.5F) - f * 0.25F) / (f * 0.25F);
GlStateManager.rotate(6.5F * f2, 0.0F, 0.0F, 1.0F);
}
}
项目:DecompiledMinecraft
文件:ModelIronGolem.java
/**
* Used for easily adding entity-dependent animations. The second and third float params here are the same second
* and third as in the setRotationAngles method.
*/
public void setLivingAnimations(EntityLivingBase entitylivingbaseIn, float p_78086_2_, float p_78086_3_, float partialTickTime)
{
EntityIronGolem entityirongolem = (EntityIronGolem)entitylivingbaseIn;
int i = entityirongolem.getAttackTimer();
if (i > 0)
{
this.ironGolemRightArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float)i - partialTickTime, 10.0F);
this.ironGolemLeftArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float)i - partialTickTime, 10.0F);
}
else
{
int j = entityirongolem.getHoldRoseTick();
if (j > 0)
{
this.ironGolemRightArm.rotateAngleX = -0.8F + 0.025F * this.func_78172_a((float)j, 70.0F);
this.ironGolemLeftArm.rotateAngleX = 0.0F;
}
else
{
this.ironGolemRightArm.rotateAngleX = (-0.2F + 1.5F * this.func_78172_a(p_78086_2_, 13.0F)) * p_78086_3_;
this.ironGolemLeftArm.rotateAngleX = (-0.2F - 1.5F * this.func_78172_a(p_78086_2_, 13.0F)) * p_78086_3_;
}
}
}
项目:BaseClient
文件:EntityAIFollowGolem.java
/**
* Returns whether the EntityAIBase should begin execution.
*/
public boolean shouldExecute()
{
if (this.theVillager.getGrowingAge() >= 0)
{
return false;
}
else if (!this.theVillager.worldObj.isDaytime())
{
return false;
}
else
{
List<EntityIronGolem> list = this.theVillager.worldObj.<EntityIronGolem>getEntitiesWithinAABB(EntityIronGolem.class, this.theVillager.getEntityBoundingBox().expand(6.0D, 2.0D, 6.0D));
if (list.isEmpty())
{
return false;
}
else
{
for (EntityIronGolem entityirongolem : list)
{
if (entityirongolem.getHoldRoseTick() > 0)
{
this.theGolem = entityirongolem;
break;
}
}
return this.theGolem != null;
}
}
}
项目:BaseClient
文件:Village.java
/**
* Called periodically by VillageCollection
*/
public void tick(int p_75560_1_)
{
this.tickCounter = p_75560_1_;
this.removeDeadAndOutOfRangeDoors();
this.removeDeadAndOldAgressors();
if (p_75560_1_ % 20 == 0)
{
this.updateNumVillagers();
}
if (p_75560_1_ % 30 == 0)
{
this.updateNumIronGolems();
}
int i = this.numVillagers / 10;
if (this.numIronGolems < i && this.villageDoorInfoList.size() > 20 && this.worldObj.rand.nextInt(7000) == 0)
{
Vec3 vec3 = this.func_179862_a(this.center, 2, 4, 2);
if (vec3 != null)
{
EntityIronGolem entityirongolem = new EntityIronGolem(this.worldObj);
entityirongolem.setPosition(vec3.xCoord, vec3.yCoord, vec3.zCoord);
this.worldObj.spawnEntityInWorld(entityirongolem);
++this.numIronGolems;
}
}
}
项目:BaseClient
文件:RenderIronGolem.java
protected void rotateCorpse(EntityIronGolem bat, float p_77043_2_, float p_77043_3_, float partialTicks)
{
super.rotateCorpse(bat, p_77043_2_, p_77043_3_, partialTicks);
if ((double)bat.limbSwingAmount >= 0.01D)
{
float f = 13.0F;
float f1 = bat.limbSwing - bat.limbSwingAmount * (1.0F - partialTicks) + 6.0F;
float f2 = (Math.abs(f1 % f - f * 0.5F) - f * 0.25F) / (f * 0.25F);
GlStateManager.rotate(6.5F * f2, 0.0F, 0.0F, 1.0F);
}
}
项目:BaseClient
文件:ModelIronGolem.java
/**
* Used for easily adding entity-dependent animations. The second and third float params here are the same second
* and third as in the setRotationAngles method.
*/
public void setLivingAnimations(EntityLivingBase entitylivingbaseIn, float p_78086_2_, float p_78086_3_, float partialTickTime)
{
EntityIronGolem entityirongolem = (EntityIronGolem)entitylivingbaseIn;
int i = entityirongolem.getAttackTimer();
if (i > 0)
{
this.ironGolemRightArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float)i - partialTickTime, 10.0F);
this.ironGolemLeftArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float)i - partialTickTime, 10.0F);
}
else
{
int j = entityirongolem.getHoldRoseTick();
if (j > 0)
{
this.ironGolemRightArm.rotateAngleX = -0.8F + 0.025F * this.func_78172_a((float)j, 70.0F);
this.ironGolemLeftArm.rotateAngleX = 0.0F;
}
else
{
this.ironGolemRightArm.rotateAngleX = (-0.2F + 1.5F * this.func_78172_a(p_78086_2_, 13.0F)) * p_78086_3_;
this.ironGolemLeftArm.rotateAngleX = (-0.2F - 1.5F * this.func_78172_a(p_78086_2_, 13.0F)) * p_78086_3_;
}
}
}
项目:BaseClient
文件:EntityAIFollowGolem.java
/**
* Returns whether the EntityAIBase should begin execution.
*/
public boolean shouldExecute()
{
if (this.theVillager.getGrowingAge() >= 0)
{
return false;
}
else if (!this.theVillager.worldObj.isDaytime())
{
return false;
}
else
{
List<EntityIronGolem> list = this.theVillager.worldObj.<EntityIronGolem>getEntitiesWithinAABB(EntityIronGolem.class, this.theVillager.getEntityBoundingBox().expand(6.0D, 2.0D, 6.0D));
if (list.isEmpty())
{
return false;
}
else
{
for (EntityIronGolem entityirongolem : list)
{
if (entityirongolem.getHoldRoseTick() > 0)
{
this.theGolem = entityirongolem;
break;
}
}
return this.theGolem != null;
}
}
}
项目:BaseClient
文件:Village.java
/**
* Called periodically by VillageCollection
*/
public void tick(int p_75560_1_)
{
this.tickCounter = p_75560_1_;
this.removeDeadAndOutOfRangeDoors();
this.removeDeadAndOldAgressors();
if (p_75560_1_ % 20 == 0)
{
this.updateNumVillagers();
}
if (p_75560_1_ % 30 == 0)
{
this.updateNumIronGolems();
}
int i = this.numVillagers / 10;
if (this.numIronGolems < i && this.villageDoorInfoList.size() > 20 && this.worldObj.rand.nextInt(7000) == 0)
{
Vec3 vec3 = this.func_179862_a(this.center, 2, 4, 2);
if (vec3 != null)
{
EntityIronGolem entityirongolem = new EntityIronGolem(this.worldObj);
entityirongolem.setPosition(vec3.xCoord, vec3.yCoord, vec3.zCoord);
this.worldObj.spawnEntityInWorld(entityirongolem);
++this.numIronGolems;
}
}
}
项目:BaseClient
文件:RenderIronGolem.java
protected void rotateCorpse(EntityIronGolem bat, float p_77043_2_, float p_77043_3_, float partialTicks)
{
super.rotateCorpse(bat, p_77043_2_, p_77043_3_, partialTicks);
if ((double)bat.limbSwingAmount >= 0.01D)
{
float f = 13.0F;
float f1 = bat.limbSwing - bat.limbSwingAmount * (1.0F - partialTicks) + 6.0F;
float f2 = (Math.abs(f1 % f - f * 0.5F) - f * 0.25F) / (f * 0.25F);
GlStateManager.rotate(6.5F * f2, 0.0F, 0.0F, 1.0F);
}
}
项目:BaseClient
文件:ModelIronGolem.java
/**
* Used for easily adding entity-dependent animations. The second and third float params here are the same second
* and third as in the setRotationAngles method.
*/
public void setLivingAnimations(EntityLivingBase entitylivingbaseIn, float p_78086_2_, float p_78086_3_, float partialTickTime)
{
EntityIronGolem entityirongolem = (EntityIronGolem)entitylivingbaseIn;
int i = entityirongolem.getAttackTimer();
if (i > 0)
{
this.ironGolemRightArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float)i - partialTickTime, 10.0F);
this.ironGolemLeftArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float)i - partialTickTime, 10.0F);
}
else
{
int j = entityirongolem.getHoldRoseTick();
if (j > 0)
{
this.ironGolemRightArm.rotateAngleX = -0.8F + 0.025F * this.func_78172_a((float)j, 70.0F);
this.ironGolemLeftArm.rotateAngleX = 0.0F;
}
else
{
this.ironGolemRightArm.rotateAngleX = (-0.2F + 1.5F * this.func_78172_a(p_78086_2_, 13.0F)) * p_78086_3_;
this.ironGolemLeftArm.rotateAngleX = (-0.2F - 1.5F * this.func_78172_a(p_78086_2_, 13.0F)) * p_78086_3_;
}
}
}
项目:Backmemed
文件:EntityAIFollowGolem.java
/**
* Returns whether the EntityAIBase should begin execution.
*/
public boolean shouldExecute()
{
if (this.theVillager.getGrowingAge() >= 0)
{
return false;
}
else if (!this.theVillager.world.isDaytime())
{
return false;
}
else
{
List<EntityIronGolem> list = this.theVillager.world.<EntityIronGolem>getEntitiesWithinAABB(EntityIronGolem.class, this.theVillager.getEntityBoundingBox().expand(6.0D, 2.0D, 6.0D));
if (list.isEmpty())
{
return false;
}
else
{
for (EntityIronGolem entityirongolem : list)
{
if (entityirongolem.getHoldRoseTick() > 0)
{
this.theGolem = entityirongolem;
break;
}
}
return this.theGolem != null;
}
}
}
项目:Backmemed
文件:Village.java
/**
* Called periodically by VillageCollection
*/
public void tick(int tickCounterIn)
{
this.tickCounter = tickCounterIn;
this.removeDeadAndOutOfRangeDoors();
this.removeDeadAndOldAgressors();
if (tickCounterIn % 20 == 0)
{
this.updateNumVillagers();
}
if (tickCounterIn % 30 == 0)
{
this.updateNumIronGolems();
}
int i = this.numVillagers / 10;
if (this.numIronGolems < i && this.villageDoorInfoList.size() > 20 && this.worldObj.rand.nextInt(7000) == 0)
{
Vec3d vec3d = this.findRandomSpawnPos(this.center, 2, 4, 2);
if (vec3d != null)
{
EntityIronGolem entityirongolem = new EntityIronGolem(this.worldObj);
entityirongolem.setPosition(vec3d.xCoord, vec3d.yCoord, vec3d.zCoord);
this.worldObj.spawnEntityInWorld(entityirongolem);
++this.numIronGolems;
}
}
}
项目:Backmemed
文件:RenderIronGolem.java
protected void rotateCorpse(EntityIronGolem entityLiving, float p_77043_2_, float p_77043_3_, float partialTicks)
{
super.rotateCorpse(entityLiving, p_77043_2_, p_77043_3_, partialTicks);
if ((double)entityLiving.limbSwingAmount >= 0.01D)
{
float f = 13.0F;
float f1 = entityLiving.limbSwing - entityLiving.limbSwingAmount * (1.0F - partialTicks) + 6.0F;
float f2 = (Math.abs(f1 % 13.0F - 6.5F) - 3.25F) / 3.25F;
GlStateManager.rotate(6.5F * f2, 0.0F, 0.0F, 1.0F);
}
}
项目:Backmemed
文件:ModelIronGolem.java
/**
* Used for easily adding entity-dependent animations. The second and third float params here are the same second
* and third as in the setRotationAngles method.
*/
public void setLivingAnimations(EntityLivingBase entitylivingbaseIn, float p_78086_2_, float p_78086_3_, float partialTickTime)
{
EntityIronGolem entityirongolem = (EntityIronGolem)entitylivingbaseIn;
int i = entityirongolem.getAttackTimer();
if (i > 0)
{
this.ironGolemRightArm.rotateAngleX = -2.0F + 1.5F * this.triangleWave((float)i - partialTickTime, 10.0F);
this.ironGolemLeftArm.rotateAngleX = -2.0F + 1.5F * this.triangleWave((float)i - partialTickTime, 10.0F);
}
else
{
int j = entityirongolem.getHoldRoseTick();
if (j > 0)
{
this.ironGolemRightArm.rotateAngleX = -0.8F + 0.025F * this.triangleWave((float)j, 70.0F);
this.ironGolemLeftArm.rotateAngleX = 0.0F;
}
else
{
this.ironGolemRightArm.rotateAngleX = (-0.2F + 1.5F * this.triangleWave(p_78086_2_, 13.0F)) * p_78086_3_;
this.ironGolemLeftArm.rotateAngleX = (-0.2F - 1.5F * this.triangleWave(p_78086_2_, 13.0F)) * p_78086_3_;
}
}
}