Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class RylinthianArmor extends ModArmor {
- ModelBiped model = null;
- public RylinthianArmor(ArmorMaterial material, int renderIndex, int armorType, String unlocalizedName) {
- super(material, renderIndex, armorType, unlocalizedName);
- }
- @Override
- public String getArmorTexture(final ItemStack stack, final Entity entity, final int slot, final String type) {
- return "magicmod:textures/armor/RylinthArmorBase.png";
- }
- @Override
- @SideOnly(Side.CLIENT)
- public ModelBiped getArmorModel(final EntityLivingBase entityLiving, final ItemStack itemStack, final int armorSlot) {
- MagicMod.log.info("THIS IS A MARKER SHOWING THAT THIS WORKED\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
- if(this.model == null) {
- switch(armorSlot) {
- case 0: model = MagicMod.proxy.getArmorModel(0); break;
- case 1: model = MagicMod.proxy.getArmorModel(1); break;
- case 2: model = MagicMod.proxy.getArmorModel(2); break;
- }
- }
- if (this.model != null) {
- this.model.bipedHead.showModel = false;//(armorSlot == 0);
- this.model.bipedHeadwear.showModel = false;//(armorSlot == 0);
- this.model.bipedBody.showModel = false;//(armorSlot == 1);
- this.model.bipedRightLeg.showModel = false;//(armorSlot == 2);
- this.model.bipedLeftLeg.showModel = false;//(armorSlot == 2);
- this.model.isSneak = entityLiving.isSneaking();
- this.model.isRiding = entityLiving.isRiding();
- this.model.isChild = entityLiving.isChild();
- this.model.aimedBow = false;
- this.model.heldItemRight = ((entityLiving.getHeldItem() != null) ? 1 : 0);
- if (entityLiving instanceof EntityPlayer && ((EntityPlayer)entityLiving).getItemInUseDuration() > 0) {
- final EnumAction enumaction = ((EntityPlayer)entityLiving).getItemInUse().getItemUseAction();
- if (enumaction == EnumAction.BLOCK) {
- this.model.heldItemRight = 3;
- }
- else if (enumaction == EnumAction.BOW) {
- this.model.aimedBow = true;
- }
- }
- }
- return this.model;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement