mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-13 00:47:32 +00:00
56 lines
1.8 KiB
Java
56 lines
1.8 KiB
Java
package tconstruct.armor.items;
|
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
import net.minecraft.client.model.ModelBiped;
|
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
import net.minecraft.entity.Entity;
|
|
import net.minecraft.entity.EntityLivingBase;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.util.IIcon;
|
|
import net.minecraft.util.ResourceLocation;
|
|
|
|
import tconstruct.armor.ArmorProxyClient;
|
|
import tconstruct.library.accessory.AccessoryCore;
|
|
import tconstruct.library.accessory.IAccessoryModel;
|
|
|
|
public class TravelGlove extends AccessoryCore implements IAccessoryModel {
|
|
|
|
public TravelGlove() {
|
|
super("travelgear/travel_glove");
|
|
}
|
|
|
|
@Override
|
|
public boolean canEquipAccessory(ItemStack item, int slot) {
|
|
return slot == 1;
|
|
}
|
|
|
|
@Override
|
|
@SideOnly(Side.CLIENT)
|
|
protected void registerModifiers(IIconRegister iconRegister) {
|
|
this.modifiers = new IIcon[4];
|
|
this.modifiers[0] = iconRegister.registerIcon("tinker:travelgear/glove_guard");
|
|
this.modifiers[1] = iconRegister.registerIcon("tinker:travelgear/glove_speedaura");
|
|
this.modifiers[2] = iconRegister.registerIcon("tinker:travelgear/glove_spines");
|
|
this.modifiers[3] = iconRegister.registerIcon("tinker:travelgear/glove_sticky");
|
|
}
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) {
|
|
return ArmorProxyClient.glove;
|
|
}
|
|
|
|
ResourceLocation texture = new ResourceLocation("tinker", "textures/armor/travel_1.png");
|
|
|
|
@Override
|
|
@SideOnly(Side.CLIENT)
|
|
public ResourceLocation getWearbleTexture(Entity entity, ItemStack stack, int slot) {
|
|
return texture;
|
|
}
|
|
|
|
@Override
|
|
public String[] getTraits() {
|
|
return new String[] { "accessory", "glove" };
|
|
}
|
|
}
|