Jump to content

[1.7.10] Texture not render right and missing


Xetapro12

Recommended Posts

and show me code in your class where you are registering the armor

I'm beginner in java and in minecraft modding.

Please be specific.

Any code examples are appreciated.

Sorry for my english i'm from Czech republic.

Please hit that thank you button if i helped :)

Link to comment
Share on other sites

and show me code in your class where you are registering the armor

 

 

 

package com.BetterArmourAndTools.armour;

 

import net.minecraft.client.renderer.texture.IIconRegister;

import net.minecraft.enchantment.EnchantmentHelper;

import net.minecraft.entity.Entity;

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.item.ItemArmor;

import net.minecraft.item.ItemStack;

import net.minecraft.item.ItemArmor.ArmorMaterial;

import net.minecraft.potion.Potion;

import net.minecraft.potion.PotionEffect;

import net.minecraft.world.World;

 

import com.BetterArmourAndTools.blocksitems.BetterArmourAndTools;

import com.BetterArmourAndTools.main.mainRegistry;

 

public class emeraldArmour extends ItemArmor{

 

private String [] armourTypes = new String [] {"helmetE", "chestplateE", "legsE", "bootsE"};

 

public emeraldArmour(ArmorMaterial armorMaterial, int renderIndex, int armourType){

super(armorMaterial, renderIndex, armourType);

}

 

@Override

public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer){

if(stack.getItem().equals(BetterArmourAndTools.helmetEmerald)|| stack.getItem().equals(BetterArmourAndTools.chestplateEmerald)|| stack.getItem().equals(BetterArmourAndTools.legsEmerald)){

return "tools:textures/armor/Emerald_1.png";

}

 

if(stack.getItem().equals(BetterArmourAndTools.legsEmerald)){

return "tools:textures/armor/Emerald_2.png";

 

}

 

else return null;

}

@Override

public void registerIcons(IIconRegister reg){

if(this == BetterArmourAndTools.helmetEmerald)

this.itemIcon = reg.registerIcon("tools:helmetE");

if(this == BetterArmourAndTools.chestplateEmerald)

this.itemIcon = reg.registerIcon("tools:chestplateE");

if(this == BetterArmourAndTools.legsEmerald)

this.itemIcon = reg.registerIcon("tools:legsE");

if(this == BetterArmourAndTools.bootsEmerald)

this.itemIcon = reg.registerIcon("tools:bootsE");

}

 

@Override

public void onArmorTick(World world, EntityPlayer player, ItemStack stack){

if(stack.getItem() == BetterArmourAndTools.bootsEmerald){

int j = EnchantmentHelper.getEnchantmentLevel(mainRegistry.speedBoost.effectId, stack);

if(j > 0){

player.addPotionEffect(new PotionEffect(Potion.moveSpeed.getId(), 50, j - 1));

}

}

 

 

}

 

}

 

 

NEWB! in java im sorry :/

Link to comment
Share on other sites

Well it doesnt matter i found it you got problem in here :

@Override
      public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer){
         if(stack.getItem().equals(BetterArmourAndTools.helmetEmerald)|| stack.getItem().equals(BetterArmourAndTools.chestplateEmerald)|| stack.getItem().equals(BetterArmourAndTools.legsEmerald)){
            return "tools:textures/armor/Emerald_1.png";
         }
         
         if(stack.getItem().equals(BetterArmourAndTools.legsEmerald)){
               return "tools:textures/armor/Emerald_2.png";
            
            }

 

in the first one emerald 1 you need to change legs to boots :)

I'm beginner in java and in minecraft modding.

Please be specific.

Any code examples are appreciated.

Sorry for my english i'm from Czech republic.

Please hit that thank you button if i helped :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.