diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/ShaftlessCogInstance.java b/src/main/java/com/simibubi/create/content/contraptions/base/ShaftlessCogInstance.java index ff96d5856..9c7e9ebee 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/ShaftlessCogInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/ShaftlessCogInstance.java @@ -15,7 +15,7 @@ public class ShaftlessCogInstance extends SingleRotatingInstance { InstancedTileRenderRegistry.instance.register(type, ShaftlessCogInstance::new)); } - public ShaftlessCogInstance(InstancedTileRenderer modelManager, KineticTileEntity tile) { + public ShaftlessCogInstance(InstancedTileRenderer modelManager, KineticTileEntity tile) { super(modelManager, tile); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/millstone/MillStoneCogInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/millstone/MillStoneCogInstance.java index 329cc5e7b..8bc4b2541 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/millstone/MillStoneCogInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/millstone/MillStoneCogInstance.java @@ -17,7 +17,7 @@ public class MillStoneCogInstance extends SingleRotatingInstance { DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> InstancedTileRenderRegistry.instance.register(type, MillStoneCogInstance::new)); } - public MillStoneCogInstance(InstancedTileRenderer modelManager, KineticTileEntity tile) { + public MillStoneCogInstance(InstancedTileRenderer modelManager, KineticTileEntity tile) { super(modelManager, tile); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawInstance.java index 62060db98..5771f4ec5 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawInstance.java @@ -22,7 +22,7 @@ public class SawInstance extends SingleRotatingInstance { InstancedTileRenderRegistry.instance.register(type, SawInstance::new)); } - public SawInstance(InstancedTileRenderer modelManager, KineticTileEntity tile) { + public SawInstance(InstancedTileRenderer modelManager, KineticTileEntity tile) { super(modelManager, tile); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpCogInstance.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpCogInstance.java index 99b4bebec..e4b699c89 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpCogInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpCogInstance.java @@ -18,7 +18,7 @@ public class PumpCogInstance extends SingleRotatingInstance { InstancedTileRenderRegistry.instance.register(type, PumpCogInstance::new)); } - public PumpCogInstance(InstancedTileRenderer modelManager, KineticTileEntity tile) { + public PumpCogInstance(InstancedTileRenderer modelManager, KineticTileEntity tile) { super(modelManager, tile); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftInstance.java b/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftInstance.java index c61315fd1..be7574bbc 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftInstance.java @@ -26,7 +26,7 @@ public class SplitShaftInstance extends KineticTileInstance> keys; - public SplitShaftInstance(InstancedTileRenderer modelManager, SplitShaftTileEntity tile) { + public SplitShaftInstance(InstancedTileRenderer modelManager, SplitShaftTileEntity tile) { super(modelManager, tile); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxInstance.java b/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxInstance.java index 9ef1a4326..9be02d612 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxInstance.java @@ -29,7 +29,7 @@ public class GearboxInstance extends KineticTileInstance { protected EnumMap> keys; protected Direction sourceFacing; - public GearboxInstance(InstancedTileRenderer modelManager, GearboxTileEntity tile) { + public GearboxInstance(InstancedTileRenderer modelManager, GearboxTileEntity tile) { super(modelManager, tile); } diff --git a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInstance.java b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInstance.java index c4600dcf2..6432569f0 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInstance.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInstance.java @@ -18,7 +18,7 @@ public class ArmInstance extends SingleRotatingInstance { InstancedTileRenderRegistry.instance.register(type, ArmInstance::new)); } - public ArmInstance(InstancedTileRenderer modelManager, KineticTileEntity tile) { + public ArmInstance(InstancedTileRenderer modelManager, KineticTileEntity tile) { super(modelManager, tile); } diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/IRendererFactory.java b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/IRendererFactory.java index 196e029d8..f1ec0d323 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/IRendererFactory.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/IRendererFactory.java @@ -4,5 +4,5 @@ import net.minecraft.tileentity.TileEntity; @FunctionalInterface public interface IRendererFactory { - TileEntityInstance create(InstancedTileRenderer manager, T te); + TileEntityInstance create(InstancedTileRenderer manager, T te); } diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedModel.java b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedModel.java index 857541f6b..b6eded4a9 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedModel.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedModel.java @@ -69,8 +69,6 @@ public abstract class InstancedModel extends BufferedMod vao.delete(); } - protected abstract D newInstance(); - public synchronized void deleteInstance(InstanceKey key) { verifyKey(key); @@ -97,6 +95,8 @@ public abstract class InstancedModel extends BufferedMod return key; } + protected abstract D newInstance(); + protected void doRender() { vao.with(vao -> { renderSetup();