Search in sources :

Example 1 with EnumBackpackType

use of forestry.api.storage.EnumBackpackType in project ForestryMC by ForestryMC.

the class ItemBackpack method registerModel.

@SideOnly(Side.CLIENT)
@Override
public void registerModel(Item item, IModelManager manager) {
    EnumBackpackType t = type == EnumBackpackType.NATURALIST ? EnumBackpackType.NORMAL : type;
    String typeTag = "backpacks/" + t.toString().toLowerCase(Locale.ENGLISH);
    models = new ModelResourceLocation[4];
    models[0] = new ModelResourceLocation("forestry:" + typeTag + "_neutral", "inventory");
    models[1] = new ModelResourceLocation("forestry:" + typeTag + "_locked", "inventory");
    models[2] = new ModelResourceLocation("forestry:" + typeTag + "_receive", "inventory");
    models[3] = new ModelResourceLocation("forestry:" + typeTag + "_resupply", "inventory");
    ModelBakery.registerItemVariants(item, new ResourceLocation("forestry:" + typeTag + "_neutral"));
    ModelBakery.registerItemVariants(item, new ResourceLocation("forestry:" + typeTag + "_locked"));
    ModelBakery.registerItemVariants(item, new ResourceLocation("forestry:" + typeTag + "_receive"));
    ModelBakery.registerItemVariants(item, new ResourceLocation("forestry:" + typeTag + "_resupply"));
    manager.registerItemModel(item, new BackpackMeshDefinition());
}
Also used : ModelResourceLocation(net.minecraft.client.renderer.block.model.ModelResourceLocation) ResourceLocation(net.minecraft.util.ResourceLocation) EnumBackpackType(forestry.api.storage.EnumBackpackType) ModelResourceLocation(net.minecraft.client.renderer.block.model.ModelResourceLocation) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Example 2 with EnumBackpackType

use of forestry.api.storage.EnumBackpackType in project ForestryMC by ForestryMC.

the class ItemBackpack method registerIcons.

@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister register) {
    icons = new IIcon[6];
    EnumBackpackType t = type == EnumBackpackType.APIARIST ? EnumBackpackType.T1 : type;
    String typeTag = "backpacks/" + t.toString().toLowerCase(Locale.ENGLISH);
    icons[0] = TextureManager.getInstance().registerTex(register, typeTag + ".cloth");
    icons[1] = TextureManager.getInstance().registerTex(register, typeTag + ".outline");
    icons[2] = TextureManager.getInstance().registerTex(register, "backpacks/neutral");
    icons[3] = TextureManager.getInstance().registerTex(register, "backpacks/locked");
    icons[4] = TextureManager.getInstance().registerTex(register, "backpacks/receive");
    icons[5] = TextureManager.getInstance().registerTex(register, "backpacks/resupply");
}
Also used : EnumBackpackType(forestry.api.storage.EnumBackpackType) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Aggregations

EnumBackpackType (forestry.api.storage.EnumBackpackType)2 SideOnly (cpw.mods.fml.relauncher.SideOnly)1 ModelResourceLocation (net.minecraft.client.renderer.block.model.ModelResourceLocation)1 ResourceLocation (net.minecraft.util.ResourceLocation)1 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)1