diff --git a/src/main/java/com/simibubi/create/content/contraptions/wrench/WrenchModel.java b/src/main/java/com/simibubi/create/content/contraptions/wrench/WrenchModel.java index 7d58c0514..eec309f87 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/wrench/WrenchModel.java +++ b/src/main/java/com/simibubi/create/content/contraptions/wrench/WrenchModel.java @@ -1,11 +1,11 @@ package com.simibubi.create.content.contraptions.wrench; -import com.simibubi.create.foundation.item.render.CustomRenderedItemModel; +import com.simibubi.create.foundation.item.render.CreateCustomRenderedItemModel; import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer; -public class WrenchModel extends CustomRenderedItemModel { +public class WrenchModel extends CreateCustomRenderedItemModel { public WrenchModel(IBakedModel template) { super(template, "wrench"); diff --git a/src/main/java/com/simibubi/create/content/curiosities/symmetry/client/SymmetryWandModel.java b/src/main/java/com/simibubi/create/content/curiosities/symmetry/client/SymmetryWandModel.java index f361c3c9f..df3a54952 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/symmetry/client/SymmetryWandModel.java +++ b/src/main/java/com/simibubi/create/content/curiosities/symmetry/client/SymmetryWandModel.java @@ -1,11 +1,11 @@ package com.simibubi.create.content.curiosities.symmetry.client; -import com.simibubi.create.foundation.item.render.CustomRenderedItemModel; +import com.simibubi.create.foundation.item.render.CreateCustomRenderedItemModel; import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer; -public class SymmetryWandModel extends CustomRenderedItemModel { +public class SymmetryWandModel extends CreateCustomRenderedItemModel { public SymmetryWandModel(IBakedModel template) { super(template, "wand_of_symmetry"); @@ -16,5 +16,5 @@ public class SymmetryWandModel extends CustomRenderedItemModel { public ItemStackTileEntityRenderer createRenderer() { return new SymmetryWandItemRenderer(); } - + } diff --git a/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripModel.java b/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripModel.java index cd37439f5..c43102214 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripModel.java +++ b/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripModel.java @@ -1,11 +1,11 @@ package com.simibubi.create.content.curiosities.tools; -import com.simibubi.create.foundation.item.render.CustomRenderedItemModel; +import com.simibubi.create.foundation.item.render.CreateCustomRenderedItemModel; import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer; -public class ExtendoGripModel extends CustomRenderedItemModel { +public class ExtendoGripModel extends CreateCustomRenderedItemModel { public ExtendoGripModel(IBakedModel template) { super(template, "extendo_grip"); diff --git a/src/main/java/com/simibubi/create/content/curiosities/tools/SandPaperItemRenderer.java b/src/main/java/com/simibubi/create/content/curiosities/tools/SandPaperItemRenderer.java index bdc8946f5..cfbdd5f41 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/tools/SandPaperItemRenderer.java +++ b/src/main/java/com/simibubi/create/content/curiosities/tools/SandPaperItemRenderer.java @@ -1,7 +1,7 @@ package com.simibubi.create.content.curiosities.tools; import com.mojang.blaze3d.matrix.MatrixStack; -import com.simibubi.create.foundation.item.render.CustomRenderedItemModel; +import com.simibubi.create.foundation.item.render.CreateCustomRenderedItemModel; import com.simibubi.create.foundation.utility.AnimationTickHolder; import net.minecraft.client.Minecraft; @@ -79,7 +79,7 @@ public class SandPaperItemRenderer extends ItemStackTileEntityRenderer { ms.popPose(); } - public static class SandPaperModel extends CustomRenderedItemModel { + public static class SandPaperModel extends CreateCustomRenderedItemModel { public SandPaperModel(IBakedModel template) { super(template, ""); diff --git a/src/main/java/com/simibubi/create/content/curiosities/weapons/PotatoCannonModel.java b/src/main/java/com/simibubi/create/content/curiosities/weapons/PotatoCannonModel.java index 5896c4d8e..29018ffa0 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/weapons/PotatoCannonModel.java +++ b/src/main/java/com/simibubi/create/content/curiosities/weapons/PotatoCannonModel.java @@ -1,11 +1,11 @@ package com.simibubi.create.content.curiosities.weapons; -import com.simibubi.create.foundation.item.render.CustomRenderedItemModel; +import com.simibubi.create.foundation.item.render.CreateCustomRenderedItemModel; import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer; -public class PotatoCannonModel extends CustomRenderedItemModel { +public class PotatoCannonModel extends CreateCustomRenderedItemModel { public PotatoCannonModel(IBakedModel template) { super(template, "potato_cannon"); diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperModel.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperModel.java index c27b76932..a9c6b89bc 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperModel.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperModel.java @@ -1,11 +1,11 @@ package com.simibubi.create.content.curiosities.zapper.terrainzapper; -import com.simibubi.create.foundation.item.render.CustomRenderedItemModel; +import com.simibubi.create.foundation.item.render.CreateCustomRenderedItemModel; import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer; -public class WorldshaperModel extends CustomRenderedItemModel { +public class WorldshaperModel extends CreateCustomRenderedItemModel { public WorldshaperModel(IBakedModel template) { super(template, "handheld_worldshaper"); diff --git a/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerModel.java b/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerModel.java index a900bddf4..e864ed5e5 100644 --- a/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerModel.java +++ b/src/main/java/com/simibubi/create/content/logistics/item/LinkedControllerModel.java @@ -1,11 +1,11 @@ package com.simibubi.create.content.logistics.item; -import com.simibubi.create.foundation.item.render.CustomRenderedItemModel; +import com.simibubi.create.foundation.item.render.CreateCustomRenderedItemModel; import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer; -public class LinkedControllerModel extends CustomRenderedItemModel { +public class LinkedControllerModel extends CreateCustomRenderedItemModel { public LinkedControllerModel(IBakedModel template) { super(template, "linked_controller"); diff --git a/src/main/java/com/simibubi/create/foundation/item/render/CreateCustomRenderedItemModel.java b/src/main/java/com/simibubi/create/foundation/item/render/CreateCustomRenderedItemModel.java new file mode 100644 index 000000000..e5e128ca6 --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/item/render/CreateCustomRenderedItemModel.java @@ -0,0 +1,13 @@ +package com.simibubi.create.foundation.item.render; + +import com.simibubi.create.Create; + +import net.minecraft.client.renderer.model.IBakedModel; + +public abstract class CreateCustomRenderedItemModel extends CustomRenderedItemModel { + + public CreateCustomRenderedItemModel(IBakedModel template, String basePath) { + super(template, Create.ID, basePath); + } + +} diff --git a/src/main/java/com/simibubi/create/foundation/item/render/CustomRenderedItemModel.java b/src/main/java/com/simibubi/create/foundation/item/render/CustomRenderedItemModel.java index 23fa7f229..3324b383a 100644 --- a/src/main/java/com/simibubi/create/foundation/item/render/CustomRenderedItemModel.java +++ b/src/main/java/com/simibubi/create/foundation/item/render/CustomRenderedItemModel.java @@ -6,7 +6,6 @@ import java.util.Map; import java.util.stream.Collectors; import com.mojang.blaze3d.matrix.MatrixStack; -import com.simibubi.create.Create; import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.model.ItemCameraTransforms; @@ -18,12 +17,14 @@ import net.minecraftforge.client.model.BakedModelWrapper; public abstract class CustomRenderedItemModel extends BakedModelWrapper { + protected String namespace; protected String basePath; protected Map partials = new HashMap<>(); protected ItemStackTileEntityRenderer renderer; - public CustomRenderedItemModel(IBakedModel template, String basePath) { + public CustomRenderedItemModel(IBakedModel template, String namespace, String basePath) { super(template); + this.namespace = namespace; this.basePath = basePath; this.renderer = createRenderer(); } @@ -72,7 +73,7 @@ public abstract class CustomRenderedItemModel extends BakedModelWrapper