public static ModelRenderer getAttachModel(ModelBiped p_getAttachModel_0_, int p_getAttachModel_1_) { switch (p_getAttachModel_1_) { case 0: return p_getAttachModel_0_.bipedBody; case 1: return p_getAttachModel_0_.bipedHead; case 2: return p_getAttachModel_0_.bipedLeftArm; case 3: return p_getAttachModel_0_.bipedRightArm; case 4: return p_getAttachModel_0_.bipedLeftLeg; case 5: return p_getAttachModel_0_.bipedRightLeg; default: return null; } }
protected void renderEquippedItems(EntityLivingBase p_renderEquippedItems_1_, float p_renderEquippedItems_2_, float p_renderEquippedItems_3_) { if (Config.isShowCapes()) { if (p_renderEquippedItems_1_ instanceof AbstractClientPlayer) { AbstractClientPlayer abstractclientplayer = (AbstractClientPlayer)p_renderEquippedItems_1_; GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.disableRescaleNormal(); GlStateManager.enableCull(); ModelBiped modelbiped = this.renderPlayer.getMainModel(); PlayerConfigurations.renderPlayerItems(modelbiped, abstractclientplayer, p_renderEquippedItems_2_, p_renderEquippedItems_3_); GlStateManager.disableCull(); } } }
@SuppressWarnings("incomplete-switch") protected void setModelSlotVisible(ModelBiped p_188359_1_, EntityEquipmentSlot slotIn) { this.setModelVisible(p_188359_1_); switch (slotIn) { case HEAD: p_188359_1_.bipedHead.showModel = true; p_188359_1_.bipedHeadwear.showModel = true; break; case CHEST: p_188359_1_.bipedBody.showModel = true; p_188359_1_.bipedRightArm.showModel = true; p_188359_1_.bipedLeftArm.showModel = true; break; case LEGS: p_188359_1_.bipedBody.showModel = true; p_188359_1_.bipedRightLeg.showModel = true; p_188359_1_.bipedLeftLeg.showModel = true; break; case FEET: p_188359_1_.bipedRightLeg.showModel = true; p_188359_1_.bipedLeftLeg.showModel = true; } }
private void renderHeldItem(EntityLivingBase p_188358_1_, ItemStack p_188358_2_, ItemCameraTransforms.TransformType p_188358_3_, EnumHandSide handSide) { if (p_188358_2_ != null) { GlStateManager.pushMatrix(); if (p_188358_1_.isSneaking()) { GlStateManager.translate(0.0F, 0.2F, 0.0F); } // Forge: moved this call down, fixes incorrect offset while sneaking. ((ModelBiped)this.livingEntityRenderer.getMainModel()).postRenderArm(0.0625F, handSide); GlStateManager.rotate(-90.0F, 1.0F, 0.0F, 0.0F); GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F); boolean flag = handSide == EnumHandSide.LEFT; GlStateManager.translate((float)(flag ? -1 : 1) / 16.0F, 0.125F, -0.625F); Minecraft.getMinecraft().getItemRenderer().renderItemSide(p_188358_1_, p_188358_2_, p_188358_3_, flag); GlStateManager.popMatrix(); } }
@Override public void setLivingAnimations(EntityLivingBase entitylivingbaseIn, float p_78086_2_, float p_78086_3_, float partialTickTime) { this.rightArmPose = ModelBiped.ArmPose.EMPTY; this.leftArmPose = ModelBiped.ArmPose.EMPTY; ItemStack itemstack = entitylivingbaseIn.getHeldItem(EnumHand.MAIN_HAND); if (!itemstack.isEmpty() && itemstack.getItem() == Items.BOW && ((EntitySkeletonWarrior) entitylivingbaseIn).isSwingingArms()) { if (entitylivingbaseIn.getPrimaryHand() == EnumHandSide.RIGHT) { this.rightArmPose = ModelBiped.ArmPose.BOW_AND_ARROW; } else { this.leftArmPose = ModelBiped.ArmPose.BOW_AND_ARROW; } } super.setLivingAnimations(entitylivingbaseIn, p_78086_2_, p_78086_3_, partialTickTime); }
/** * Setup renderer * * This method is responsible for setting up any client side stuff like * the renderer, texture of the entity and the "hands" */ @SideOnly(Side.CLIENT) protected void setupRenderer() { this.renderer = Minecraft.getMinecraft().getRenderManager().getEntityRenderObject(this.entity); if (this.renderer instanceof RenderLivingBase<?>) { ModelBase model = ((RenderLivingBase<?>) renderer).getMainModel(); if (this.customSettings && model instanceof ModelBiped || model instanceof ModelQuadruped) { this.settings.hands = true; } } }
/** * 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) { this.rightArmPose = ModelBiped.ArmPose.EMPTY; this.leftArmPose = ModelBiped.ArmPose.EMPTY; ItemStack itemstack = entitylivingbaseIn.getHeldItem(EnumHand.MAIN_HAND); if (itemstack != null && itemstack.getItem() == Items.BOW && ((MobSkeleton) entitylivingbaseIn).isSwingingArms()) { if (entitylivingbaseIn.getPrimaryHand() == EnumHandSide.RIGHT) { this.rightArmPose = ModelBiped.ArmPose.BOW_AND_ARROW; } else { this.leftArmPose = ModelBiped.ArmPose.BOW_AND_ARROW; } } super.setLivingAnimations(entitylivingbaseIn, p_78086_2_, p_78086_3_, partialTickTime); }
@Override @SideOnly(Side.CLIENT) @Nullable public ModelBiped getArmorModel(EntityLivingBase living, ItemStack stack, EntityEquipmentSlot slot, ModelBiped defaultModel) { if (!stack.isEmpty()) { if (stack.getItem() instanceof ItemArmor) { if (EntityEquipmentSlot.LEGS == slot) { ModelElytraJetLegs armorModel = RenderElytraJetAlegs.elytraJetLegsModel; armorModel.isRiding = defaultModel.isRiding; armorModel.isChild = defaultModel.isChild; armorModel.isElytraFlying = living.isElytraFlying(); return armorModel; } } } return null; }
public void setModelVisibilities (T entity) { final ModelPlayerMob model = this.getMainModel(); final ItemStack mainhand = entity.getHeldItemMainhand(); final ItemStack offhand = entity.getHeldItemOffhand(); model.setVisible(true); this.setOverlayVisibility(entity, model); model.isSneak = entity.isSneaking(); final ModelBiped.ArmPose mainArm = this.getPoseForStack(entity, mainhand); final ModelBiped.ArmPose offhandArm = this.getPoseForStack(entity, offhand); final boolean isRightHanded = entity.getPrimaryHand() == EnumHandSide.RIGHT; model.rightArmPose = isRightHanded ? mainArm : offhandArm; model.leftArmPose = isRightHanded ? offhandArm : mainArm; }
/** * Gets the arm pose for a player's hand. * * @param stack The stack in the player's hand. * @param player The player to get info for. * @return The pose of the player's hand. */ private ArmPose getArmPose (ItemStack stack, EntityPlayer player) { if (stack.isEmpty()) { return ArmPose.EMPTY; } ArmPose pose = ModelBiped.ArmPose.ITEM; if (player.getItemInUseCount() > 0) { final EnumAction action = stack.getItemUseAction(); pose = action == EnumAction.BLOCK ? ArmPose.BLOCK : action == EnumAction.BOW ? ArmPose.BOW_AND_ARROW : pose; } return pose; }
public void registerRenderThings() { RenderingRegistry.registerEntityRenderingHandler(EntityZombieNotch.class, new RenderZombieNotch(new ModelZombie(), 0)); RenderingRegistry.registerEntityRenderingHandler(EntityZombieMiner.class, new RenderZombieMiner(new ModelZombie(), 0)); RenderingRegistry.registerEntityRenderingHandler(EntityZombieChef.class, new RenderZombieChef(new ModelZombie(), 0)); RenderingRegistry.registerEntityRenderingHandler(EntityZombieCreeper.class, new RenderZombieCreeper(new ModelCreeper(), 0)); RenderingRegistry.registerEntityRenderingHandler(EntityZombiePirate.class, new RenderZombiePirate(new ModelZombie(), 0)); RenderingRegistry.registerEntityRenderingHandler(EntityZombiePa.class, new RenderZombiePa(new ModelZombie(), 0)); RenderingRegistry.registerEntityRenderingHandler(EntityNetherZombie.class, new RenderNetherZombie(new ModelZombie(), 0)); RenderingRegistry.registerEntityRenderingHandler(EntityZombieCyborg.class, new RenderZombieCyborg(new ModelZombie(), 0)); RenderingRegistry.registerEntityRenderingHandler(EntityZombieDwarf.class, new RenderZombieDwarf(new ModelZombie(), 0)); RenderingRegistry.registerEntityRenderingHandler(EntityZombieHerobrine.class, new RenderZombieHerobrine(new ModelZombie(), 0)); RenderingRegistry.registerEntityRenderingHandler(EntityZombieKing.class, new RenderZombieKing(new ModelZombie(), 0)); RenderingRegistry.registerEntityRenderingHandler(EntityZombieKnight.class, new RenderZombieKnight(new ModelZombie(), 0)); RenderingRegistry.registerEntityRenderingHandler(EntityDiscoZombie.class, new RenderDiscoZombie(new ModelZombie(), 0)); RenderingRegistry.registerEntityRenderingHandler(EntitySurvivor.class, new RenderSurvivor(new ModelBiped(), 0)); }
@Override @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { ModelCustomArmor model = ModelCustomArmor.INSTANCE; if(this == MekanismItems.Jetpack) { model.modelType = ArmorModel.JETPACK; } else if(this == MekanismItems.ArmoredJetpack) { model.modelType = ArmorModel.ARMOREDJETPACK; } return model; }
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; }
@Override @SideOnly( Side.CLIENT ) public ModelBiped getArmorModel( EntityLivingBase entity, ItemStack stack, int slot ) { if ( slot != 3 ) { return null; } WingsModel model = wingModels.get( entity ); if ( model == null ) { wingModels.put( entity, new WingsModel( entity ) ); return getArmorModel( entity, stack, slot ); } return model; }
@SideOnly(Side.CLIENT) // @Override public ModelBiped getArmorModel(EntityLiving entityLiving, ItemStack itemStack, int armorSlot) { ModelBiped armorModel = null; if (itemStack != null) { if (itemStack.getItem() instanceof ItemDaedricArmor) { } } int type = ((ItemArmor) itemStack.getItem()).armorType; if (type == 1 || type == 3) { armorModel = TheDarkEra.proxy.getArmorModel(0); } else { armorModel = TheDarkEra.proxy.getArmorModel(1); } // if (armorSlot == 0) // return new ModelScaleHelm(); return null; }
@Override public Timeline getTimeline(EntityPlayer player, ModelBiped model) { Timeline timeline = Timeline.createSequence() .beginParallel() .push(Tween.to(model, ModelAccessor.RIGHT_ARM_Z, 400F).target(pi - 0.5F)) .push(Tween.to(model, ModelAccessor.LEFT_ARM_Z, 400F).target(-pi + 0.5F)) .end() .beginParallel() .push(Tween.to(model, ModelAccessor.RIGHT_ARM_X, 150F).target(-0.6F).repeatYoyo(11, 0F)) .push(Tween.to(model, ModelAccessor.LEFT_ARM_X, 150F).target(-0.6F).repeatYoyo(11, 0F)) .end() .beginParallel() .push(Tween.to(model, ModelAccessor.RIGHT_ARM_Z, 400F).target(0F)) .push(Tween.to(model, ModelAccessor.LEFT_ARM_Z, 400F).target(0F)) .push(Tween.to(model, ModelAccessor.RIGHT_ARM_X, 400F).target(0F)) .push(Tween.to(model, ModelAccessor.LEFT_ARM_X, 400F).target(0F)) .end(); return timeline; }
public static ModelBiped getArmorModel(int i) { final ModelCelestialBronzeArmor tutChest = new ModelCelestialBronzeArmor(1.0f); final ModelCelestialBronzeArmor tutLegs = new ModelCelestialBronzeArmor(0.5f); switch (i) { case 0: return tutChest; case 1: return tutLegs; default: break; } // returns default id return tutChest; }
@Override @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { if ((itemStack != null)) { if (itemStack.getItem() instanceof ImplantCyberneticEye) { ModelEyeImplant model = (ModelEyeImplant) Cybernetica.proxy.modelEye; model.bipedHead.showModel = true; model.isSneak = entityLiving.isSneaking(); model.isRiding = entityLiving.isRiding(); model.isChild = entityLiving.isChild(); model.heldItemRight = ((EntityPlayer) entityLiving).getCurrentArmor(0) != null ? 1 : 0; return model; } } return null; }
@Override @SideOnly(Side.CLIENT) public ModelBiped getArmourModel(EntityLivingBase entityLiving, ItemStack itemStack, int armourSlot) { ArmourSlot slot = ArmourSlot.getArmourSlot(armourSlot); switch (slot) { case HELMET: return new AdvancedArmourModel(true, false, false, false, false); case CHESTPLATE: return new AdvancedArmourModel(false, true, true, false, false); case LEGS: return new AdvancedArmourModel(false, false, false, true, false); case BOOTS: return new AdvancedArmourModel(false, false, false, false, true); default: break; } return null; }
@Override public ModelBiped getArmorModel(int id) { switch (id) { case 0: return armorNecroChest; case 1: return armorNecro; case 2: return armorPaladinChest; case 3: return armorPaladin; default: break; } return null; }
@Override public Timeline getTimeline(EntityPlayer player, ModelBiped model) { Timeline timeline = Timeline.createSequence() .beginParallel() .push(Tween.to(model, ModelAccessor.LEFT_ARM_Z, 2000F).target(-pi / 2)) .push(Tween.to(model, ModelAccessor.RIGHT_ARM_Z, 2000F).target(pi / 2)) .push(Tween.to(model, ModelAccessor.LEFT_LEG_Z, 2000F).target(-pi / 2)) .push(Tween.to(model, ModelAccessor.RIGHT_LEG_Z, 2000F).target(pi / 2)) .end() .pushPause(2000F) .beginParallel() .push(Tween.to(model, ModelAccessor.LEFT_ARM_Z, 500F).target(0F)) .push(Tween.to(model, ModelAccessor.RIGHT_ARM_Z, 500F).target(0F)) .push(Tween.to(model, ModelAccessor.LEFT_LEG_Z, 500F).target(0F)) .push(Tween.to(model, ModelAccessor.RIGHT_LEG_Z, 500F).target(0F)) .end(); return timeline; }
public static ModelBiped getArmorModel(PackBase pack, EntityLivingBase entity) { ModelBiped model = null; switch (pack.armorModel) { case JETPACK: model = ModelJetpack.INSTANCE; break; case FLUX_PACK: model = ModelFluxPack.INSTANCE; default: } if (model == null) { return null; } model.isSneak = entity.isSneaking(); model.isRiding = entity.isRiding(); model.isChild = entity.isChild(); model.heldItemRight = entity.getEquipmentInSlot(0) != null ? 1 : 0; if (entity instanceof EntityPlayer) { model.aimedBow = ((EntityPlayer) entity).getItemInUseDuration() > 2; } return model; }
@Override public Timeline getTimeline(EntityPlayer player, ModelBiped model) { Timeline timeline = Timeline.createSequence() .beginParallel() .push(Tween.to(model, ModelAccessor.LEFT_ARM_X, 100F).target(-pi / 4)) .push(Tween.to(model, ModelAccessor.RIGHT_ARM_X, 100F).target(pi / 4)) .push(Tween.to(model, ModelAccessor.LEFT_LEG_X, 100F).target(pi / 4)) .push(Tween.to(model, ModelAccessor.RIGHT_LEG_X, 100F).target(-pi / 4)) .end() .beginParallel() .push(Tween.to(model, ModelAccessor.LEFT_ARM_X, 200F).target(pi / 4).repeatYoyo(10, 0F)) .push(Tween.to(model, ModelAccessor.RIGHT_ARM_X, 200F).target(-pi / 4).repeatYoyo(10, 0F)) .push(Tween.to(model, ModelAccessor.LEFT_LEG_X, 200F).target(-pi / 4).repeatYoyo(10, 0F)) .push(Tween.to(model, ModelAccessor.RIGHT_LEG_X, 200F).target(pi / 4).repeatYoyo(10, 0F)) .end() .beginParallel() .push(Tween.to(model, ModelAccessor.LEFT_ARM_X, 100F).target(0F)) .push(Tween.to(model, ModelAccessor.RIGHT_ARM_X, 100F).target(0F)) .push(Tween.to(model, ModelAccessor.LEFT_LEG_X, 100F).target(0F)) .push(Tween.to(model, ModelAccessor.RIGHT_LEG_X, 100F).target(0F)) .end(); return timeline; }
@Override public Timeline getTimeline(EntityPlayer player, ModelBiped model) { Timeline timeline = Timeline.createSequence() .beginParallel() .push(Tween.to(model, ModelAccessor.HEAD_X, 150F).target(0F)) .push(Tween.to(model, ModelAccessor.HEAD_Y, 150F).target(0F)) .push(Tween.to(model, ModelAccessor.HEAD_Z, 150F).target(0F)) .push(Tween.to(model, ModelAccessor.RIGHT_ARM_X, 400F).target(-pi + 0.8F)) .push(Tween.to(model, ModelAccessor.RIGHT_ARM_Z, 400F).target(0.4F)) .end() .push(Tween.to(model, ModelAccessor.RIGHT_ARM_Z, 150F).target(0.3F).repeatYoyo(5, 0F)) .beginParallel() .push(Tween.to(model, ModelAccessor.RIGHT_ARM_X, 300F).target(0F)) .push(Tween.to(model, ModelAccessor.RIGHT_ARM_Z, 300F).target(0F)) .end(); return timeline; }
@Override @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLivingBase player, ItemStack stack, int slot) { ModelBiped model = new FlowstoneArmorModel(0.5F); model.bipedRightLeg.isHidden = true; model.bipedLeftLeg.isHidden = true; model.bipedBody.isHidden = true; model.bipedRightArm.isHidden = true; model.bipedLeftArm.isHidden = true; model.isSneak = player.isSneaking(); model.isRiding = player.isRiding(); model.isChild = player.isChild(); return model; }
@Override public int getValues(ModelBiped target, int tweenType, float[] returnValues) { int axis = tweenType % 3; int bodyPart = tweenType / 3 * 3; ModelRenderer model = getBodyPart(target, bodyPart); if(model == null) return 0; if(axis == ROT_X) returnValues[0] = model.rotateAngleX; else if(axis == ROT_Y) returnValues[0] = model.rotateAngleY; else returnValues[0] = model.rotateAngleZ; return 1; }
private void func_82427_a(EntityZombie p_82427_1_) { if(p_82427_1_.func_82231_m()) { if(this.field_82431_q != this.field_82432_p.func_82897_a()) { this.field_82432_p = new ModelZombieVillager(); this.field_82431_q = this.field_82432_p.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.field_77045_g = this.field_82432_p; this.field_82423_g = this.field_82436_m; this.field_82425_h = this.field_82433_n; } else { this.field_77045_g = this.field_82434_o; this.field_82423_g = this.field_82437_k; this.field_82425_h = this.field_82435_l; } this.field_77071_a = (ModelBiped)this.field_77045_g; }
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; }
private void setRenderHead(EntityLivingBase entity, boolean setRender) { if (entity.getItemStackFromSlot(EntityEquipmentSlot.HEAD).getItem() == Itemss.PNEUMATIC_HELMET && (ConfigHandler.client.useHelmetModel || DateEventHandler.isIronManEvent())) { Render renderer = Minecraft.getMinecraft().getRenderManager().getEntityRenderObject(entity); if (renderer instanceof RenderBiped) { ModelBiped modelBiped = (ModelBiped) ((RenderBiped) renderer).getMainModel(); modelBiped.bipedHead.showModel = setRender; } } }
/** * Override this method to have an item handle its own armor rendering. * * @param entityLiving The entity wearing the armor * @param itemStack The itemStack to render the model of * @param armorSlot 0=head, 1=torso, 2=legs, 3=feet * @return A ModelBiped to render instead of the default */ @Override @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, EntityEquipmentSlot armorSlot, ModelBiped _default) { if (armorSlot == EntityEquipmentSlot.HEAD && (ConfigHandler.client.useHelmetModel || DateEventHandler.isIronManEvent())) { /*RenderItemPneumaticHelmet.INSTANCE.render(entityLiving); RenderPlayer render = (RenderPlayer)Minecraft.getMinecraft().getRenderManager().entityRenderMap.get(EntityPlayer.class); ModelBiped model = armorSlot == 2 ? render.modelArmor : render.modelArmorChestplate; model.bipedHead.showModel = false; return model;*///TODO 1.8 fix } return null; }
@SideOnly(Side.CLIENT) @Override public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, EntityEquipmentSlot armorSlot, ModelBiped _default) { if (itemStack != null) { if (itemStack.getItem() instanceof ItemArmor) { EntityEquipmentSlot type = ((ItemArmor) itemStack.getItem()).armorType; ModelArmour armorModel = null; switch (type) { case HEAD: case LEGS: armorModel = HarshenCastle.proxy.getArmorModel(0); break; case FEET: case CHEST: armorModel = HarshenCastle.proxy.getArmorModel(1); break; default: break; } armorModel.slotActive = armorSlot; armorModel.isSneak = _default.isSneak; armorModel.isRiding = _default.isRiding; armorModel.isChild = _default.isChild; armorModel.rightArmPose = _default.rightArmPose; armorModel.leftArmPose = _default.leftArmPose; return armorModel; } } return null; }
public static ModelBiped getModel(EntityLivingBase entity, ItemStack stack) { if (stack.isEmpty() || !(stack.getItem() instanceof ItemArmor)) { return null; } EntityEquipmentSlot slot = ((ItemArmor) stack.getItem()).armorType; HazmatSuitModel armor; if (slot == EntityEquipmentSlot.HEAD && modelHelm != null) { return modelHelm; } armor = new HazmatSuitModel(); armor.bipedBody.isHidden = true; armor.bipedLeftArm.isHidden = true; armor.bipedRightArm.isHidden = true; armor.bipedHead.isHidden = true; armor.bipedLeftLeg.isHidden = true; armor.bipedRightLeg.isHidden = true; switch (slot) { case HEAD: armor.bipedHead.isHidden = false; modelHelm = armor; break; } return armor; }
public static ModelBiped getModel(EntityLivingBase entity, ItemStack stack) { if (stack.isEmpty() || !(stack.getItem() instanceof ItemArmor)) { return null; } EntityEquipmentSlot slot = ((ItemArmor) stack.getItem()).armorType; ProtectiveHelmetModel2 armor; if (slot == EntityEquipmentSlot.HEAD && modelHelm2 != null) { return modelHelm2; } armor = new ProtectiveHelmetModel2(); armor.bipedBody.isHidden = true; armor.bipedLeftArm.isHidden = true; armor.bipedRightArm.isHidden = true; armor.bipedHead.isHidden = true; armor.bipedLeftLeg.isHidden = true; armor.bipedRightLeg.isHidden = true; switch (slot) { case HEAD: armor.bipedHead.isHidden = false; modelHelm2 = armor; break; } return armor; }
public static ModelBiped getModel(EntityLivingBase entity, ItemStack stack) { if (stack.isEmpty() || !(stack.getItem() instanceof ItemArmor)) { return null; } EntityEquipmentSlot slot = ((ItemArmor) stack.getItem()).armorType; ProtectiveHelmetModel armor; if (slot == EntityEquipmentSlot.HEAD && modelHelm != null) { return modelHelm; } armor = new ProtectiveHelmetModel(); armor.bipedBody.isHidden = true; armor.bipedLeftArm.isHidden = true; armor.bipedRightArm.isHidden = true; armor.bipedHead.isHidden = true; armor.bipedLeftLeg.isHidden = true; armor.bipedRightLeg.isHidden = true; switch (slot) { case HEAD: armor.bipedHead.isHidden = false; modelHelm = armor; break; } return armor; }
public static ModelBiped getModel(EntityLivingBase entity, ItemStack stack) { if (stack.isEmpty() || !(stack.getItem() instanceof ItemArmor)) { return null; } EntityEquipmentSlot slot = ((ItemArmor) stack.getItem()).armorType; InformationGlassesModel armor; if (slot == EntityEquipmentSlot.HEAD && modelHelm != null) { return modelHelm; } armor = new InformationGlassesModel(); armor.bipedBody.isHidden = true; armor.bipedLeftArm.isHidden = true; armor.bipedRightArm.isHidden = true; armor.bipedHead.isHidden = true; armor.bipedLeftLeg.isHidden = true; armor.bipedRightLeg.isHidden = true; switch (slot) { case HEAD: armor.bipedHead.isHidden = false; modelHelm = armor; break; } return armor; }
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; }
protected void func_177179_a(ModelBiped p_177179_1_, int p_177179_2_) { this.func_177194_a(p_177179_1_); switch (p_177179_2_) { case 1: p_177179_1_.bipedRightLeg.showModel = true; p_177179_1_.bipedLeftLeg.showModel = true; break; case 2: p_177179_1_.bipedBody.showModel = true; p_177179_1_.bipedRightLeg.showModel = true; p_177179_1_.bipedLeftLeg.showModel = true; break; case 3: p_177179_1_.bipedBody.showModel = true; p_177179_1_.bipedRightArm.showModel = true; p_177179_1_.bipedLeftArm.showModel = true; break; case 4: p_177179_1_.bipedHead.showModel = true; p_177179_1_.bipedHeadwear.showModel = true; } }