diff options
-rw-r--r-- | defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeItem.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeItem.java b/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeItem.java index ee1fef0..e9450a4 100644 --- a/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeItem.java +++ b/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeItem.java @@ -428,6 +428,13 @@ public class TypeItem extends CITType { try (InputStream is = resourceManager.getResource(firstItemModelIdentifier).orElseThrow().getInputStream()) { JsonUnbakedModel json = JsonUnbakedModel.deserialize(IOUtils.toString(is, StandardCharsets.UTF_8)); + if (((JsonUnbakedModelAccessor) json).getParentId().equals(new Identifier("minecraft", "item/template_spawn_egg"))) { // HOTFIX: Fixes not being able to change spawn eggs using texture cits + try (InputStream parentInputStream = resourceManager.getResource(new Identifier("minecraft", "models/item/template_spawn_egg.json")).orElseThrow().getInputStream()) { + json = JsonUnbakedModel.deserialize(IOUtils.toString(parentInputStream, StandardCharsets.UTF_8)); + ((JsonUnbakedModelAccessor) json).getTextureMap().remove("layer1"); // PARITY + } + } + if (!GENERATED_SUB_CITS_SEEN.add(firstItemModelIdentifier)) // cit generated duplicate firstItemModelIdentifier = new Identifier(firstItemModelIdentifier.getNamespace(), GENERATED_SUB_CITS_PREFIX + GENERATED_SUB_CITS_SEEN.size() + "_" + firstItemModelIdentifier.getPath()); GENERATED_SUB_CITS_SEEN.add(firstItemModelIdentifier); |