Added an ability to register custom item variants, not ending with "#inventory". Should allow grouping multiple item models into 1 blockstate json.

This commit is contained in:
RainWarrior committed 2015-12-24 06:06:38 +03:00
1 parent a54b939ea3
commit 097c0c6130
5 files changed
+68 -12

No files matched your search

@@ -60,9 +60,10 @@ public class ModelFluidDebug
Item fluid = Item.getItemFromBlock(TestFluidBlock.instance);
Item gas = Item.getItemFromBlock(TestGasBlock.instance);
Item milk = Item.getItemFromBlock(MilkFluidBlock.instance);
ModelBakery.addVariantName(fluid);
ModelBakery.addVariantName(gas);
ModelBakery.addVariantName(milk);
// no need to pass the locations here, since they'll be loaded by the block model logic.
ModelBakery.registerItemVariants(fluid);
ModelBakery.registerItemVariants(gas);
ModelBakery.registerItemVariants(milk);
ModelLoader.setCustomMeshDefinition(fluid, new ItemMeshDefinition()
{
public ModelResourceLocation getModelLocation(ItemStack stack)