Skip to content

Commit

Permalink
Kill broken method/remove uneeded class.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Behrhof committed Jul 11, 2015
1 parent 0bcb31c commit 6a363b3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 23 deletions.
33 changes: 16 additions & 17 deletions src/mantle/client/ModelVariant.java
Expand Up @@ -2,7 +2,6 @@

import java.util.ArrayList;

import mantle.items.util.IItemWithVariants;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.model.ModelBakery;
Expand Down Expand Up @@ -42,6 +41,16 @@ public void addVariantNames(Block block, String... names)
ModelBakery.addVariantName(Item.getItemFromBlock(block), names);
}

public void addVariantNames(Item item, String... names)
{
for (int i = 0; i < names.length; i++)
{
names[i] = getResource(names[i]);
}

ModelBakery.addVariantName(item, names);
}

public void registerBlockModel(Block block)
{
ResourceLocation resourceLocation = (ResourceLocation) Block.blockRegistry.getNameForObject(block);
Expand All @@ -60,17 +69,14 @@ public void registerBlockModel(Block block, int meta, String modelName)
{
registerItemModel(Item.getItemFromBlock(block), meta, modelName);
}
public void registerItemModelVariants(Item item)

public void registerItemModel(Item item, int meta, String resourcePath)
{
for (int i = 0; i < ((IItemWithVariants) item).getVariantNames().length; i++)
{
String NAME = item.getUnlocalizedName().substring(5) + "_" + ((IItemWithVariants) item).getVariantNames()[i];
ModelBakery.addVariantName(item, getResource(NAME));
this.registerItemModel(item, i, getResource(NAME));
}
ModelResourceLocation modelResourceLocation = new ModelResourceLocation(resourcePath, "inventory");

mc.getRenderItem().getItemModelMesher().register(item, meta, modelResourceLocation);
}

public void registerItemSubTypesModel(Item item, CreativeTabs tab)
{
ArrayList<ItemStack> list = new ArrayList<ItemStack>();
Expand All @@ -80,11 +86,4 @@ public void registerItemSubTypesModel(Item item, CreativeTabs tab)
this.registerItemModel(item, i.getItemDamage(), item.getUnlocalizedName().substring(5));
}
}

public void registerItemModel(Item item, int meta, String resourcePath)
{
ModelResourceLocation modelResourceLocation = new ModelResourceLocation(resourcePath, "inventory");

mc.getRenderItem().getItemModelMesher().register(item, meta, modelResourceLocation);
}
}
6 changes: 0 additions & 6 deletions src/mantle/items/util/IItemWithVariants.java

This file was deleted.

0 comments on commit 6a363b3

Please sign in to comment.