Holding sigil can provide it's own mesh provider now

This commit is contained in:
Nicholas Ignoffo 2018-03-07 19:55:32 -08:00
parent 554993ea79
commit fefeaf26af
2 changed files with 20 additions and 10 deletions

View file

@ -240,14 +240,5 @@ public class RegistrarBloodMagicItems {
for (Int2ObjectMap.Entry<String> variant : variants.int2ObjectEntrySet())
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(b), variant.getIntKey(), new ModelResourceLocation(b.getRegistryName(), variant.getValue()));
});
final ResourceLocation holdingLoc = SIGIL_HOLDING.getRegistryName();
ModelLoader.setCustomMeshDefinition(SIGIL_HOLDING, stack -> {
if (stack.hasTagCompound() && stack.getTagCompound().hasKey("color"))
return new ModelResourceLocation(holdingLoc, "type=color");
return new ModelResourceLocation(holdingLoc, "type=normal");
});
ModelLoader.registerItemVariants(SIGIL_HOLDING, new ModelResourceLocation(holdingLoc, "type=normal"));
ModelLoader.registerItemVariants(SIGIL_HOLDING, new ModelResourceLocation(holdingLoc, "type=color"));
}
}