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

@@ -55,17 +55,18 @@ public class DynBucketTest
return ModelDynBucket.LOCATION;
}
});
ModelBakery.addVariantName(dynBucket, "forge:dynbucket");
ModelBakery.registerItemVariants(dynBucket, new ResourceLocation("forge", "dynbucket"));
final ModelResourceLocation bottle = new ModelResourceLocation(new ResourceLocation("forge", "dynbottle"), "inventory");
ModelLoader.setCustomMeshDefinition(dynBottle, new ItemMeshDefinition()
{
@Override
public ModelResourceLocation getModelLocation(ItemStack stack)
{
return new ModelResourceLocation(new ResourceLocation("forge", "dynbottle"), "inventory");
return bottle;
}
});
ModelBakery.addVariantName(dynBottle, "forge:dynbottle");
ModelBakery.registerItemVariants(dynBottle, bottle);
}
}