mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
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:
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user