From 343c0fab622ff0ad34b61886f033bc579c248ff0 Mon Sep 17 00:00:00 2001 From: Jozufozu Date: Sun, 10 Apr 2022 17:37:13 -0700 Subject: [PATCH] Material refactor pt 1 - PartialModels don't actually need reference states, use air instead - Bump flywheel build --- gradle.properties | 2 +- .../contraptions/base/HalfShaftInstance.java | 2 +- .../components/actors/DrillActorInstance.java | 16 ++++++++-------- .../components/actors/DrillInstance.java | 2 +- .../actors/HarvesterActorInstance.java | 4 +++- .../components/actors/PIInstance.java | 6 +++--- .../crafter/MechanicalCrafterInstance.java | 2 +- .../components/crank/HandCrankInstance.java | 2 +- .../deployer/DeployerActorInstance.java | 4 ++-- .../components/deployer/DeployerInstance.java | 6 +++--- .../contraptions/components/fan/FanInstance.java | 4 ++-- .../components/flywheel/FlyWheelInstance.java | 12 ++++++------ .../components/flywheel/engine/EngineBlock.java | 1 - .../flywheel/engine/EngineInstance.java | 4 +++- .../millstone/MillStoneCogInstance.java | 2 +- .../components/mixer/MixerInstance.java | 6 +++--- .../components/press/PressInstance.java | 2 +- .../contraptions/components/saw/SawInstance.java | 2 +- .../bearing/BearingInstance.java | 2 +- .../bearing/StabilizedBearingInstance.java | 4 ++-- .../chassis/StickerInstance.java | 10 +++++----- .../gantry/GantryCarriageInstance.java | 2 +- .../structureMovement/glue/GlueInstance.java | 6 +++--- .../structureMovement/glue/GlueModel.java | 10 ++++------ .../pulley/HosePulleyInstance.java | 10 +++++----- .../pulley/RopePulleyInstance.java | 6 +++--- .../structureMovement/render/FlwContraption.java | 2 +- .../render/FlwContraptionManager.java | 6 +++--- .../contraptions/fluids/PumpCogInstance.java | 4 ++-- .../fluids/pipes/FluidValveInstance.java | 2 +- .../contraptions/relays/belt/BeltInstance.java | 8 ++++---- .../elementary/BracketedKineticTileInstance.java | 5 ++--- .../relays/encased/EncasedCogInstance.java | 4 ++-- .../relays/encased/SplitShaftInstance.java | 2 +- .../contraptions/relays/gauge/GaugeInstance.java | 6 +++--- .../relays/gearbox/GearboxInstance.java | 2 +- .../armor/CopperBacktankInstance.java | 2 +- .../curiosities/toolbox/ToolBoxInstance.java | 4 ++-- .../block/belts/tunnel/BeltTunnelInstance.java | 4 ++-- .../logistics/block/depot/EjectorInstance.java | 2 +- .../block/diodes/BrassDiodeInstance.java | 2 +- .../logistics/block/funnel/FunnelInstance.java | 4 ++-- .../block/mechanicalArm/ArmInstance.java | 14 +++++++------- .../block/redstone/AnalogLeverInstance.java | 4 ++-- .../schematics/block/SchematicannonInstance.java | 4 ++-- src/main/resources/META-INF/mods.toml | 2 +- 46 files changed, 106 insertions(+), 106 deletions(-) diff --git a/gradle.properties b/gradle.properties index bef758929..943a79117 100644 --- a/gradle.properties +++ b/gradle.properties @@ -19,7 +19,7 @@ parchment_version = 2022.03.13 # dependency versions registrate_version = MC1.18.2-1.0.25 -flywheel_version = 1.18-0.6.2.64 +flywheel_version = 1.18-0.7.0.67 jei_minecraft_version = 1.18.2 jei_version = 9.5.3.143 diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/HalfShaftInstance.java b/src/main/java/com/simibubi/create/content/contraptions/base/HalfShaftInstance.java index 6ddaf3acf..81f84dc08 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/HalfShaftInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/HalfShaftInstance.java @@ -16,7 +16,7 @@ public class HalfShaftInstance extends SingleRotatingInstance { @Override protected Instancer getModel() { Direction dir = getShaftDirection(); - return getRotatingMaterial().getModel(AllBlockPartials.SHAFT_HALF, blockState, dir); + return getRotatingMaterial().getModel(AllBlockPartials.SHAFT_HALF, dir); } protected Direction getShaftDirection() { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillActorInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillActorInstance.java index 304fe9cd1..4c78fa5af 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillActorInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillActorInstance.java @@ -39,14 +39,14 @@ public class DrillActorInstance extends ActorInstance { else eulerY = facing.toYRot() + ((axis == Direction.Axis.X) ? 180 : 0); - drillHead = material.getModel(AllBlockPartials.DRILL_HEAD, state).createInstance(); - - drillHead.setPosition(context.localPos) - .setBlockLight(localBlockLight()) - .setRotationOffset(0) - .setRotationAxis(0, 0, 1) - .setLocalRotation(new Quaternion(eulerX, eulerY, 0, true)) - .setSpeed(getSpeed(facing)); + drillHead = material.getModel(AllBlockPartials.DRILL_HEAD) + .createInstance() + .setPosition(context.localPos) + .setBlockLight(localBlockLight()) + .setRotationOffset(0) + .setRotationAxis(0, 0, 1) + .setLocalRotation(new Quaternion(eulerX, eulerY, 0, true)) + .setSpeed(getSpeed(facing)); } @Override diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillInstance.java index cf949ebd4..dc95e478a 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillInstance.java @@ -21,6 +21,6 @@ public class DrillInstance extends SingleRotatingInstance { protected Instancer getModel() { BlockState referenceState = blockEntity.getBlockState(); Direction facing = referenceState.getValue(BlockStateProperties.FACING); - return getRotatingMaterial().getModel(AllBlockPartials.DRILL_HEAD, referenceState, facing); + return getRotatingMaterial().getModel(AllBlockPartials.DRILL_HEAD, facing); } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterActorInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterActorInstance.java index de07acdd9..341558f91 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterActorInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterActorInstance.java @@ -3,6 +3,7 @@ package com.simibubi.create.content.contraptions.components.actors; import com.jozufozu.flywheel.api.Material; import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.core.Materials; +import com.jozufozu.flywheel.core.Models; import com.jozufozu.flywheel.core.materials.model.ModelData; import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld; import com.simibubi.create.AllBlockPartials; @@ -41,7 +42,8 @@ public class HarvesterActorInstance extends ActorInstance { facing = state.getValue(BlockStateProperties.HORIZONTAL_FACING); - harvester = material.getModel(AllBlockPartials.HARVESTER_BLADE, state).createInstance(); + harvester = material.model(Models.partial(AllBlockPartials.HARVESTER_BLADE)) + .createInstance(); horizontalAngle = facing.toYRot() + ((facing.getAxis() == Direction.Axis.X) ? 180 : 0); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/PIInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/PIInstance.java index ec28142a6..06556b27e 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/PIInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/PIInstance.java @@ -33,11 +33,11 @@ public class PIInstance { this.lit = lit; middle = materialManager.defaultSolid() .material(Materials.TRANSFORMED) - .getModel(PortableStorageInterfaceRenderer.getMiddleForState(blockState, lit), blockState) + .getModel(PortableStorageInterfaceRenderer.getMiddleForState(blockState, lit)) .createInstance(); top = materialManager.defaultSolid() .material(Materials.TRANSFORMED) - .getModel(PortableStorageInterfaceRenderer.getTopForState(blockState), blockState) + .getModel(PortableStorageInterfaceRenderer.getTopForState(blockState)) .createInstance(); } @@ -66,7 +66,7 @@ public class PIInstance { this.lit = lit; materialManager.defaultSolid() .material(Materials.TRANSFORMED) - .getModel(PortableStorageInterfaceRenderer.getMiddleForState(blockState, lit), blockState) + .getModel(PortableStorageInterfaceRenderer.getMiddleForState(blockState, lit)) .stealInstance(middle); } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterInstance.java index f0536efbf..cff0e0884 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterInstance.java @@ -23,7 +23,7 @@ public class MechanicalCrafterInstance extends SingleRotatingInstance { protected Instancer getModel() { Direction facing = blockState.getValue(MechanicalCrafterBlock.HORIZONTAL_FACING); - return getRotatingMaterial().getModel(AllBlockPartials.SHAFTLESS_COGWHEEL, blockState, facing, rotateToFace(facing)); + return getRotatingMaterial().getModel(AllBlockPartials.SHAFTLESS_COGWHEEL, facing, rotateToFace(facing)); } private Supplier rotateToFace(Direction facing) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankInstance.java index c3eaeb218..248388787 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankInstance.java @@ -31,7 +31,7 @@ public class HandCrankInstance extends SingleRotatingInstance implements Dynamic facing = blockState.getValue(BlockStateProperties.FACING); Direction opposite = facing.getOpposite(); - Instancer model = getTransformMaterial().getModel(renderedHandle, blockState, opposite); + Instancer model = getTransformMaterial().getModel(renderedHandle, opposite); crank = model.createInstance(); rotateCrank(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerActorInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerActorInstance.java index 7477c48d1..0ab7684ae 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerActorInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerActorInstance.java @@ -61,8 +61,8 @@ public class DeployerActorInstance extends ActorInstance { xRot = facing == Direction.UP ? 270 : facing == Direction.DOWN ? 90 : 0; zRot = rotatePole ? 90 : 0; - pole = mat.getModel(AllBlockPartials.DEPLOYER_POLE, state).createInstance(); - hand = mat.getModel(handPose, state).createInstance(); + pole = mat.getModel(AllBlockPartials.DEPLOYER_POLE).createInstance(); + hand = mat.getModel(handPose).createInstance(); Direction.Axis axis = ((IRotate) state.getBlock()).getRotationAxis(state); shaft = materialManager.defaultSolid() diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerInstance.java index 9087f5eab..4733a6b3a 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerInstance.java @@ -47,11 +47,11 @@ public class DeployerInstance extends ShaftInstance implements DynamicInstance, xRot = facing == Direction.UP ? 270 : facing == Direction.DOWN ? 90 : 0; zRot = rotatePole ? 90 : 0; - pole = getOrientedMaterial().getModel(AllBlockPartials.DEPLOYER_POLE, blockState).createInstance(); + pole = getOrientedMaterial().getModel(AllBlockPartials.DEPLOYER_POLE).createInstance(); currentHand = this.tile.getHandPose(); - hand = getOrientedMaterial().getModel(currentHand, blockState).createInstance(); + hand = getOrientedMaterial().getModel(currentHand).createInstance(); progress = getProgress(AnimationTickHolder.getPartialTicks()); updateRotation(pole, hand, yRot, xRot, zRot); @@ -64,7 +64,7 @@ public class DeployerInstance extends ShaftInstance implements DynamicInstance, if (currentHand != handPose) { currentHand = handPose; - getOrientedMaterial().getModel(currentHand, blockState) + getOrientedMaterial().getModel(currentHand) .stealInstance(hand); } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/fan/FanInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/fan/FanInstance.java index 9a7dfa93b..f10ab9464 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/fan/FanInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/fan/FanInstance.java @@ -25,10 +25,10 @@ public class FanInstance extends KineticTileInstance { direction = blockState.getValue(FACING); opposite = direction.getOpposite(); - shaft = getRotatingMaterial().getModel(AllBlockPartials.SHAFT_HALF, blockState, opposite).createInstance(); + shaft = getRotatingMaterial().getModel(AllBlockPartials.SHAFT_HALF, opposite).createInstance(); fan = modelManager.defaultCutout() .material(AllMaterialSpecs.ROTATING) - .getModel(AllBlockPartials.ENCASED_FAN_INNER, blockState, opposite) + .getModel(AllBlockPartials.ENCASED_FAN_INNER, opposite) .createInstance(); setup(shaft); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/FlyWheelInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/FlyWheelInstance.java index 30e087aae..589888f14 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/FlyWheelInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/FlyWheelInstance.java @@ -54,7 +54,7 @@ public class FlyWheelInstance extends KineticTileInstance im BlockState referenceState = blockState.rotate(Rotation.CLOCKWISE_90); wheel = getTransformMaterial() - .getModel(AllBlockPartials.FLYWHEEL, referenceState, referenceState.getValue(HORIZONTAL_FACING)) + .getModel(AllBlockPartials.FLYWHEEL, referenceState.getValue(HORIZONTAL_FACING)) .createInstance(); connection = FlywheelBlock.getConnection(blockState); @@ -68,13 +68,13 @@ public class FlyWheelInstance extends KineticTileInstance im Material mat = getTransformMaterial(); - upperRotating = mat.getModel(AllBlockPartials.FLYWHEEL_UPPER_ROTATING, blockState) + upperRotating = mat.getModel(AllBlockPartials.FLYWHEEL_UPPER_ROTATING) .createInstance(); - lowerRotating = mat.getModel(AllBlockPartials.FLYWHEEL_LOWER_ROTATING, blockState) + lowerRotating = mat.getModel(AllBlockPartials.FLYWHEEL_LOWER_ROTATING) .createInstance(); - upperSliding = mat.getModel(AllBlockPartials.FLYWHEEL_UPPER_SLIDING, blockState) + upperSliding = mat.getModel(AllBlockPartials.FLYWHEEL_UPPER_SLIDING) .createInstance(); - lowerSliding = mat.getModel(AllBlockPartials.FLYWHEEL_LOWER_SLIDING, blockState) + lowerSliding = mat.getModel(AllBlockPartials.FLYWHEEL_LOWER_SLIDING) .createInstance(); connectors = Lists.newArrayList(upperRotating, lowerRotating, upperSliding, lowerSliding); @@ -168,7 +168,7 @@ public class FlyWheelInstance extends KineticTileInstance im protected Instancer shaftModel() { Direction opposite = facing.getOpposite(); - return getRotatingMaterial().getModel(AllBlockPartials.SHAFT_HALF, blockState, opposite); + return getRotatingMaterial().getModel(AllBlockPartials.SHAFT_HALF, opposite); } protected void transformConnector(TransformStack ms, boolean upper, boolean rotating, float angle, diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineBlock.java index c3eb5bdfc..5354e321e 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineBlock.java @@ -84,7 +84,6 @@ public abstract class EngineBlock extends HorizontalDirectionalBlock implements return pos.relative(state.getValue(FACING).getOpposite()); } - @Nullable @OnlyIn(Dist.CLIENT) public abstract PartialModel getFrameModel(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineInstance.java index 2cd886817..ee67b4786 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineInstance.java @@ -2,8 +2,10 @@ package com.simibubi.create.content.contraptions.components.flywheel.engine; import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.backend.instancing.blockentity.BlockEntityInstance; +import com.jozufozu.flywheel.core.Materials; import com.jozufozu.flywheel.core.PartialModel; import com.jozufozu.flywheel.core.materials.model.ModelData; +import com.jozufozu.flywheel.core.model.ModelUtil; import com.simibubi.create.foundation.utility.AngleHelper; import net.minecraft.core.Direction; @@ -26,7 +28,7 @@ public class EngineInstance extends BlockEntityInstance { Direction facing = blockState.getValue(BlockStateProperties.HORIZONTAL_FACING); - this.frame = getTransformMaterial().getModel(frame, blockState).createInstance(); + this.frame = getTransformMaterial().getModel(frame).createInstance(); float angle = AngleHelper.rad(AngleHelper.horizontalAngle(facing)); 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 1e8831261..28737db56 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 @@ -15,6 +15,6 @@ public class MillStoneCogInstance extends SingleRotatingInstance { @Override protected Instancer getModel() { - return getRotatingMaterial().getModel(AllBlockPartials.MILLSTONE_COG, blockEntity.getBlockState()); + return getRotatingMaterial().getModel(AllBlockPartials.MILLSTONE_COG); } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MixerInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MixerInstance.java index 8104dd20b..cf1e2dfb8 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MixerInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MixerInstance.java @@ -22,13 +22,13 @@ public class MixerInstance extends EncasedCogInstance implements DynamicInstance super(dispatcher, tile, false); this.mixer = tile; - mixerHead = getRotatingMaterial().getModel(AllBlockPartials.MECHANICAL_MIXER_HEAD, blockState) + mixerHead = getRotatingMaterial().getModel(AllBlockPartials.MECHANICAL_MIXER_HEAD) .createInstance(); mixerHead.setRotationAxis(Direction.Axis.Y); mixerPole = getOrientedMaterial() - .getModel(AllBlockPartials.MECHANICAL_MIXER_POLE, blockState) + .getModel(AllBlockPartials.MECHANICAL_MIXER_POLE) .createInstance(); @@ -42,7 +42,7 @@ public class MixerInstance extends EncasedCogInstance implements DynamicInstance protected Instancer getCogModel() { return materialManager.defaultSolid() .material(AllMaterialSpecs.ROTATING) - .getModel(AllBlockPartials.SHAFTLESS_COGWHEEL, blockEntity.getBlockState()); + .getModel(AllBlockPartials.SHAFTLESS_COGWHEEL); } @Override diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/press/PressInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/press/PressInstance.java index ff842943e..0d33238c5 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/press/PressInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/press/PressInstance.java @@ -22,7 +22,7 @@ public class PressInstance extends ShaftInstance implements DynamicInstance { pressHead = dispatcher.defaultSolid() .material(Materials.ORIENTED) - .getModel(AllBlockPartials.MECHANICAL_PRESS_HEAD, blockState) + .getModel(AllBlockPartials.MECHANICAL_PRESS_HEAD) .createInstance(); Quaternion q = Vector3f.YP.rotationDegrees(AngleHelper.horizontalAngle(blockState.getValue(MechanicalPressBlock.HORIZONTAL_FACING))); 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 bba424cbf..f35867d28 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 @@ -25,7 +25,7 @@ public class SawInstance extends SingleRotatingInstance { .isHorizontal()) { BlockState referenceState = blockState.rotate(blockEntity.getLevel(), blockEntity.getBlockPos(), Rotation.CLOCKWISE_180); Direction facing = referenceState.getValue(BlockStateProperties.FACING); - return getRotatingMaterial().getModel(AllBlockPartials.SHAFT_HALF, referenceState, facing); + return getRotatingMaterial().getModel(AllBlockPartials.SHAFT_HALF, facing); } else { return getRotatingMaterial().getModel(shaft()); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingInstance.java index e4f303402..a0af457fb 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingInstance.java @@ -35,7 +35,7 @@ public class BearingInstance e PartialModel top = bearing.isWoodenTop() ? AllBlockPartials.BEARING_TOP_WOODEN : AllBlockPartials.BEARING_TOP; - topInstance = getOrientedMaterial().getModel(top, blockState).createInstance(); + topInstance = getOrientedMaterial().getModel(top).createInstance(); topInstance.setPosition(getInstancePosition()).setRotation(blockOrientation); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedBearingInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedBearingInstance.java index 88d9b7998..b9aa31cc1 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedBearingInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedBearingInstance.java @@ -38,7 +38,7 @@ public class StabilizedBearingInstance extends ActorInstance { topInstance = materialManager.defaultSolid() .material(Materials.ORIENTED) - .getModel(AllBlockPartials.BEARING_TOP, blockState) + .getModel(AllBlockPartials.BEARING_TOP) .createInstance(); int blockLight = localBlockLight(); @@ -48,7 +48,7 @@ public class StabilizedBearingInstance extends ActorInstance { shaft = materialManager.defaultSolid() .material(AllMaterialSpecs.ROTATING) - .getModel(AllBlockPartials.SHAFT_HALF, blockState, blockState.getValue(BlockStateProperties.FACING).getOpposite()) + .getModel(AllBlockPartials.SHAFT_HALF, blockState.getValue(BlockStateProperties.FACING).getOpposite()) .createInstance(); // not rotating so no need to set speed, axis, etc. diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerInstance.java index e94e2b5ce..bd88c3937 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerInstance.java @@ -17,20 +17,20 @@ public class StickerInstance extends BlockEntityInstance impl float lastOffset = Float.NaN; final Direction facing; final boolean fakeWorld; - final int offset; + final int extended; private final ModelData head; public StickerInstance(MaterialManager modelManager, StickerTileEntity tile) { super(modelManager, tile); - head = getTransformMaterial().getModel(AllBlockPartials.STICKER_HEAD, blockState).createInstance(); + head = getTransformMaterial().getModel(AllBlockPartials.STICKER_HEAD).createInstance(); fakeWorld = tile.getLevel() != Minecraft.getInstance().level; facing = blockState.getValue(StickerBlock.FACING); - offset = blockState.getValue(StickerBlock.EXTENDED) ? 1 : 0; + extended = blockState.getValue(StickerBlock.EXTENDED) ? 1 : 0; - animateHead(offset); + animateHead(extended); } @Override @@ -38,7 +38,7 @@ public class StickerInstance extends BlockEntityInstance impl float offset = blockEntity.piston.getValue(AnimationTickHolder.getPartialTicks()); if (fakeWorld) - offset = this.offset; + offset = this.extended; if (Mth.equal(offset, lastOffset)) return; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryCarriageInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryCarriageInstance.java index f84270b53..ea45e5a85 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryCarriageInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryCarriageInstance.java @@ -30,7 +30,7 @@ public class GantryCarriageInstance extends ShaftInstance implements DynamicInst super(dispatcher, tile); gantryCogs = getTransformMaterial() - .getModel(AllBlockPartials.GANTRY_COGS, blockState) + .getModel(AllBlockPartials.GANTRY_COGS) .createInstance(); facing = blockState.getValue(GantryCarriageBlock.FACING); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/GlueInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/GlueInstance.java index 7282da1e1..5559845a1 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/GlueInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/GlueInstance.java @@ -31,7 +31,7 @@ public class GlueInstance extends EntityInstance implements Tic public GlueInstance(MaterialManager materialManager, SuperGlueEntity entity) { super(materialManager, entity); - Instancer instancer = getInstancer(materialManager, entity); + Instancer instancer = getInstancer(materialManager); Direction face = entity.getFacingDirection(); rotation = new Quaternion(AngleHelper.verticalAngle(face), AngleHelper.horizontalAngle(face), 0, true); @@ -42,10 +42,10 @@ public class GlueInstance extends EntityInstance implements Tic .update(); } - private Instancer getInstancer(MaterialManager materialManager, SuperGlueEntity entity) { + private Instancer getInstancer(MaterialManager materialManager) { MaterialGroup group = GlueModel.USE_ATLAS ? materialManager.defaultCutout() : materialManager.cutout(RenderType.entityCutout(TEXTURE)); - return group.material(Materials.ORIENTED).model(entity.getType(), GlueModel::get); + return group.material(Materials.ORIENTED).model(GlueModel.INSTANCE); } @Override diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/GlueModel.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/GlueModel.java index 0c279a640..c8316e4fd 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/GlueModel.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/GlueModel.java @@ -1,7 +1,9 @@ package com.simibubi.create.content.contraptions.components.structureMovement.glue; +import com.jozufozu.flywheel.api.ModelSupplier; import com.jozufozu.flywheel.api.vertex.VertexList; import com.jozufozu.flywheel.core.Formats; +import com.jozufozu.flywheel.core.SimpleModelSupplier; import com.jozufozu.flywheel.core.model.Model; import com.jozufozu.flywheel.core.vertex.PosTexNormalWriterUnsafe; import com.mojang.blaze3d.platform.MemoryTracker; @@ -14,16 +16,12 @@ import net.minecraft.world.phys.Vec3; public class GlueModel implements Model { - public static final GlueModel INSTANCE = new GlueModel(); + public static final ModelSupplier INSTANCE = new SimpleModelSupplier(GlueModel::new); static final boolean USE_ATLAS = false; - public static GlueModel get() { - return INSTANCE; - } - private final VertexList reader; - private GlueModel() { + protected GlueModel() { PosTexNormalWriterUnsafe writer = Formats.POS_TEX_NORMAL.createWriter(MemoryTracker.create(size())); createGlueModel(writer); reader = writer.intoReader(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/HosePulleyInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/HosePulleyInstance.java index 62d7c0e65..82ee19872 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/HosePulleyInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/HosePulleyInstance.java @@ -15,27 +15,27 @@ public class HosePulleyInstance extends AbstractPulleyInstance { } protected Instancer getRopeModel() { - return getOrientedMaterial().getModel(AllBlockPartials.HOSE, blockState); + return getOrientedMaterial().getModel(AllBlockPartials.HOSE); } protected Instancer getMagnetModel() { return materialManager.defaultCutout() .material(Materials.ORIENTED) - .getModel(AllBlockPartials.HOSE_MAGNET, blockState); + .getModel(AllBlockPartials.HOSE_MAGNET); } protected Instancer getHalfMagnetModel() { return materialManager.defaultCutout() .material(Materials.ORIENTED) - .getModel(AllBlockPartials.HOSE_HALF_MAGNET, blockState); + .getModel(AllBlockPartials.HOSE_HALF_MAGNET); } protected Instancer getCoilModel() { - return getOrientedMaterial().getModel(AllBlockPartials.HOSE_COIL, blockState, rotatingAbout); + return getOrientedMaterial().getModel(AllBlockPartials.HOSE_COIL, rotatingAbout); } protected Instancer getHalfRopeModel() { - return getOrientedMaterial().getModel(AllBlockPartials.HOSE_HALF, blockState); + return getOrientedMaterial().getModel(AllBlockPartials.HOSE_HALF); } protected float getOffset() { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/RopePulleyInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/RopePulleyInstance.java index 5eac17ee0..f12027ff4 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/RopePulleyInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/RopePulleyInstance.java @@ -22,15 +22,15 @@ public class RopePulleyInstance extends AbstractPulleyInstance { } protected Instancer getHalfMagnetModel() { - return getOrientedMaterial().getModel(AllBlockPartials.ROPE_HALF_MAGNET, blockState); + return getOrientedMaterial().getModel(AllBlockPartials.ROPE_HALF_MAGNET); } protected Instancer getCoilModel() { - return getOrientedMaterial().getModel(AllBlockPartials.ROPE_COIL, blockState, rotatingAbout); + return getOrientedMaterial().getModel(AllBlockPartials.ROPE_COIL, rotatingAbout); } protected Instancer getHalfRopeModel() { - return getOrientedMaterial().getModel(AllBlockPartials.ROPE_HALF, blockState); + return getOrientedMaterial().getModel(AllBlockPartials.ROPE_HALF); } protected float getOffset() { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/FlwContraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/FlwContraption.java index 566f4aeed..e937d4347 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/FlwContraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/FlwContraption.java @@ -181,7 +181,7 @@ public class FlwContraption extends ContraptionRenderInfo { private final ContraptionInstanceManager tileInstanceManager; public ContraptionInstanceWorld(FlwContraption parent) { - switch (Backend.getEngine()) { + switch (Backend.getBackendType()) { case INSTANCING -> { InstancingEngine engine = InstancingEngine.builder(CreateContexts.CWORLD) .setGroupFactory(ContraptionGroup.forContraption(parent)) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/FlwContraptionManager.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/FlwContraptionManager.java index 4b68fd1a8..4a50d28bb 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/FlwContraptionManager.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/FlwContraptionManager.java @@ -4,10 +4,10 @@ import static org.lwjgl.opengl.GL11.glBindTexture; import static org.lwjgl.opengl.GL12.GL_TEXTURE_3D; import com.jozufozu.flywheel.backend.Backend; -import com.jozufozu.flywheel.backend.RenderLayer; +import com.jozufozu.flywheel.api.RenderLayer; import com.jozufozu.flywheel.backend.gl.GlStateTracker; import com.jozufozu.flywheel.backend.gl.GlTextureUnit; -import com.jozufozu.flywheel.config.FlwEngine; +import com.jozufozu.flywheel.config.BackendType; import com.jozufozu.flywheel.core.Formats; import com.jozufozu.flywheel.core.Materials; import com.jozufozu.flywheel.core.compile.ProgramContext; @@ -43,7 +43,7 @@ public class FlwContraptionManager extends ContraptionRenderingWorld getModel() { BlockState referenceState = blockEntity.getBlockState(); Direction facing = referenceState.getValue(BlockStateProperties.FACING); - return getRotatingMaterial().getModel(AllBlockPartials.MECHANICAL_PUMP_COG, referenceState, facing); + return getRotatingMaterial().getModel(AllBlockPartials.MECHANICAL_PUMP_COG, facing); } @Override diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveInstance.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveInstance.java index d8d688604..ba772fded 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveInstance.java @@ -40,7 +40,7 @@ public class FluidValveInstance extends ShaftInstance implements DynamicInstance pointer = materialManager.defaultSolid() .material(Materials.TRANSFORMED) - .getModel(AllBlockPartials.FLUID_VALVE_POINTER, blockState).createInstance(); + .getModel(AllBlockPartials.FLUID_VALVE_POINTER).createInstance(); transformPointer(); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltInstance.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltInstance.java index 0a518ce6c..637a909ee 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltInstance.java @@ -62,9 +62,9 @@ public class BeltInstance extends KineticTileInstance { PartialModel beltPartial = BeltRenderer.getBeltPartial(diagonal, start, end, bottom); SpriteShiftEntry spriteShift = BeltRenderer.getSpriteShiftEntry(color, diagonal, bottom); - Instancer beltModel = materialManager.defaultSolid() - .material(AllMaterialSpecs.BELTS) - .getModel(beltPartial, blockState); + Instancer beltModel = materialManager.defaultSolid() + .material(AllMaterialSpecs.BELTS) + .getModel(beltPartial); keys.add(setup(beltModel.createInstance(), bottom, spriteShift)); @@ -143,7 +143,7 @@ public class BeltInstance extends KineticTileInstance { return modelTransform; }; - return getRotatingMaterial().getModel(AllBlockPartials.BELT_PULLEY, blockState, dir, ms); + return getRotatingMaterial().getModel(AllBlockPartials.BELT_PULLEY, dir, ms); } private Direction getOrientation() { diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/BracketedKineticTileInstance.java b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/BracketedKineticTileInstance.java index e6ab3d5ef..0eeb76a45 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/BracketedKineticTileInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/BracketedKineticTileInstance.java @@ -38,8 +38,7 @@ public class BracketedKineticTileInstance extends SingleRotatingInstance { BlockPos pos = blockEntity.getBlockPos(); float offset = BracketedKineticTileRenderer.getShaftAngleOffset(axis, pos); Direction facing = Direction.fromAxisAndDirection(axis, AxisDirection.POSITIVE); - Instancer half = getRotatingMaterial().getModel(AllBlockPartials.COGWHEEL_SHAFT, blockState, - facing, () -> this.rotateToAxis(axis)); + Instancer half = getRotatingMaterial().getModel(AllBlockPartials.COGWHEEL_SHAFT, facing, () -> this.rotateToAxis(axis)); additionalShaft = setup(half.createInstance(), speed); additionalShaft.setRotationOffset(offset); @@ -52,7 +51,7 @@ public class BracketedKineticTileInstance extends SingleRotatingInstance { Axis axis = KineticTileEntityRenderer.getRotationAxisOf(blockEntity); Direction facing = Direction.fromAxisAndDirection(axis, AxisDirection.POSITIVE); - return getRotatingMaterial().getModel(AllBlockPartials.SHAFTLESS_LARGE_COGWHEEL, blockState, facing, + return getRotatingMaterial().getModel(AllBlockPartials.SHAFTLESS_LARGE_COGWHEEL, facing, () -> this.rotateToAxis(axis)); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/encased/EncasedCogInstance.java b/src/main/java/com/simibubi/create/content/contraptions/relays/encased/EncasedCogInstance.java index 62d6f45bc..e639affe0 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/encased/EncasedCogInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/encased/EncasedCogInstance.java @@ -58,7 +58,7 @@ public class EncasedCogInstance extends KineticTileInstance { for (Direction d : Iterate.directionsInAxis(axis)) { if (!def.hasShaftTowards(blockEntity.getLevel(), blockEntity.getBlockPos(), blockState, d)) continue; - RotatingData data = setup(getRotatingMaterial().getModel(AllBlockPartials.SHAFT_HALF, blockState, d) + RotatingData data = setup(getRotatingMaterial().getModel(AllBlockPartials.SHAFT_HALF, d) .createInstance()); if (d.getAxisDirection() == AxisDirection.POSITIVE) rotatingTopShaft = Optional.of(data); @@ -94,7 +94,7 @@ public class EncasedCogInstance extends KineticTileInstance { Direction.fromAxisAndDirection(referenceState.getValue(BlockStateProperties.AXIS), AxisDirection.POSITIVE); PartialModel partial = large ? AllBlockPartials.SHAFTLESS_LARGE_COGWHEEL : AllBlockPartials.SHAFTLESS_COGWHEEL; - return getRotatingMaterial().getModel(partial, referenceState, facing, () -> { + return getRotatingMaterial().getModel(partial, facing, () -> { PoseStack poseStack = new PoseStack(); TransformStack.cast(poseStack) .centre() 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 d6ded2749..a2daa223d 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 @@ -30,7 +30,7 @@ public class SplitShaftInstance extends KineticTileInstance half = rotatingMaterial.getModel(AllBlockPartials.SHAFT_HALF, blockState, dir); + Instancer half = rotatingMaterial.getModel(AllBlockPartials.SHAFT_HALF, dir); float splitSpeed = speed * tile.getRotationSpeedModifier(dir); diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeInstance.java b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeInstance.java index b27f44012..3da739fca 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeInstance.java @@ -32,7 +32,7 @@ public abstract class GaugeInstance extends ShaftInstance implements DynamicInst GaugeTileEntity gaugeTile = (GaugeTileEntity) tile; GaugeBlock gaugeBlock = (GaugeBlock) blockState.getBlock(); - Instancer dialModel = getTransformMaterial().getModel(AllBlockPartials.GAUGE_DIAL, blockState); + Instancer dialModel = getTransformMaterial().getModel(AllBlockPartials.GAUGE_DIAL); Instancer headModel = getHeadModel(); ms = new PoseStack(); @@ -150,7 +150,7 @@ public abstract class GaugeInstance extends ShaftInstance implements DynamicInst @Override protected Instancer getHeadModel() { - return getTransformMaterial().getModel(AllBlockPartials.GAUGE_HEAD_SPEED, blockState); + return getTransformMaterial().getModel(AllBlockPartials.GAUGE_HEAD_SPEED); } } @@ -161,7 +161,7 @@ public abstract class GaugeInstance extends ShaftInstance implements DynamicInst @Override protected Instancer getHeadModel() { - return getTransformMaterial().getModel(AllBlockPartials.GAUGE_HEAD_STRESS, blockState); + return getTransformMaterial().getModel(AllBlockPartials.GAUGE_HEAD_STRESS); } } } 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 ae7173155..5458da064 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 @@ -40,7 +40,7 @@ public class GearboxInstance extends KineticTileInstance { if (boxAxis == axis) continue; - Instancer shaft = rotatingMaterial.getModel(AllBlockPartials.SHAFT_HALF, blockState, direction); + Instancer shaft = rotatingMaterial.getModel(AllBlockPartials.SHAFT_HALF, direction); RotatingData key = shaft.createInstance(); diff --git a/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankInstance.java b/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankInstance.java index 26d1b9139..3bf2cf240 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankInstance.java +++ b/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankInstance.java @@ -15,7 +15,7 @@ public class CopperBacktankInstance extends SingleRotatingInstance { @Override protected Instancer getModel() { - return getRotatingMaterial().getModel(AllBlockPartials.COPPER_BACKTANK_SHAFT, blockState); + return getRotatingMaterial().getModel(AllBlockPartials.COPPER_BACKTANK_SHAFT); } } diff --git a/src/main/java/com/simibubi/create/content/curiosities/toolbox/ToolBoxInstance.java b/src/main/java/com/simibubi/create/content/curiosities/toolbox/ToolBoxInstance.java index aac661c5e..79ec8d4dc 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/toolbox/ToolBoxInstance.java +++ b/src/main/java/com/simibubi/create/content/curiosities/toolbox/ToolBoxInstance.java @@ -32,12 +32,12 @@ public class ToolBoxInstance extends BlockEntityInstance impl Instancer drawerModel = materialManager.defaultSolid() .material(Materials.TRANSFORMED) - .getModel(AllBlockPartials.TOOLBOX_DRAWER, blockState); + .getModel(AllBlockPartials.TOOLBOX_DRAWER); drawers = new ModelData[]{drawerModel.createInstance(), drawerModel.createInstance()}; lid = materialManager.defaultCutout() .material(Materials.TRANSFORMED) - .getModel(AllBlockPartials.TOOLBOX_LIDS.get(blockEntity.getColor()), blockState) + .getModel(AllBlockPartials.TOOLBOX_LIDS.get(blockEntity.getColor())) .createInstance(); } diff --git a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelInstance.java b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelInstance.java index 9f0402373..34d9f6be8 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelInstance.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelInstance.java @@ -29,8 +29,8 @@ public class BeltTunnelInstance extends BlockEntityInstance(Direction.class); Instancer model = modelManager.defaultSolid() - .material(AllMaterialSpecs.FLAPS) - .getModel(AllBlockPartials.BELT_TUNNEL_FLAP, blockState); + .material(AllMaterialSpecs.FLAPS) + .getModel(AllBlockPartials.BELT_TUNNEL_FLAP); int blockLight = world.getBrightness(LightLayer.BLOCK, pos); int skyLight = world.getBrightness(LightLayer.SKY, pos); diff --git a/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorInstance.java b/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorInstance.java index 1a37a1141..ae76e46cb 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorInstance.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorInstance.java @@ -21,7 +21,7 @@ public class EjectorInstance extends ShaftInstance implements DynamicInstance { super(dispatcher, tile); this.tile = tile; - plate = getTransformMaterial().getModel(AllBlockPartials.EJECTOR_TOP, blockState).createInstance(); + plate = getTransformMaterial().getModel(AllBlockPartials.EJECTOR_TOP).createInstance(); pivotPlate(); } diff --git a/src/main/java/com/simibubi/create/content/logistics/block/diodes/BrassDiodeInstance.java b/src/main/java/com/simibubi/create/content/logistics/block/diodes/BrassDiodeInstance.java index 450726b17..a8fae6f8f 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/diodes/BrassDiodeInstance.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/diodes/BrassDiodeInstance.java @@ -19,7 +19,7 @@ public class BrassDiodeInstance extends BlockEntityInstance implem PartialModel flapPartial = (blockState.getBlock() instanceof FunnelBlock ? AllBlockPartials.FUNNEL_FLAP : AllBlockPartials.BELT_FUNNEL_FLAP); Instancer model = modelManager.defaultSolid() - .material(AllMaterialSpecs.FLAPS) - .getModel(flapPartial, blockState); + .material(AllMaterialSpecs.FLAPS) + .getModel(flapPartial); int blockLight = world.getBrightness(LightLayer.BLOCK, pos); int skyLight = world.getBrightness(LightLayer.SKY, pos); 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 2feb23b98..859f126b7 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 @@ -49,13 +49,13 @@ public class ArmInstance extends SingleRotatingInstance implements DynamicInstan Material mat = getTransformMaterial(); - base = mat.getModel(AllBlockPartials.ARM_BASE, blockState).createInstance(); - lowerBody = mat.getModel(AllBlockPartials.ARM_LOWER_BODY, blockState).createInstance(); - upperBody = mat.getModel(AllBlockPartials.ARM_UPPER_BODY, blockState).createInstance(); - head = mat.getModel(AllBlockPartials.ARM_HEAD, blockState).createInstance(); - claw = mat.getModel(AllBlockPartials.ARM_CLAW_BASE, blockState).createInstance(); + base = mat.getModel(AllBlockPartials.ARM_BASE).createInstance(); + lowerBody = mat.getModel(AllBlockPartials.ARM_LOWER_BODY).createInstance(); + upperBody = mat.getModel(AllBlockPartials.ARM_UPPER_BODY).createInstance(); + head = mat.getModel(AllBlockPartials.ARM_HEAD).createInstance(); + claw = mat.getModel(AllBlockPartials.ARM_CLAW_BASE).createInstance(); - Instancer clawHalfModel = mat.getModel(AllBlockPartials.ARM_CLAW_GRIP, blockState); + Instancer clawHalfModel = mat.getModel(AllBlockPartials.ARM_CLAW_GRIP); ModelData clawGrip1 = clawHalfModel.createInstance(); ModelData clawGrip2 = clawHalfModel.createInstance(); @@ -172,7 +172,7 @@ public class ArmInstance extends SingleRotatingInstance implements DynamicInstan @Override protected Instancer getModel() { - return getRotatingMaterial().getModel(AllBlockPartials.ARM_COG, blockEntity.getBlockState()); + return getRotatingMaterial().getModel(AllBlockPartials.ARM_COG); } @Override diff --git a/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverInstance.java b/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverInstance.java index 4195b9dde..1e0ce0a05 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverInstance.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverInstance.java @@ -28,8 +28,8 @@ public class AnalogLeverInstance extends BlockEntityInstance mat = getTransformMaterial(); - handle = mat.getModel(AllBlockPartials.ANALOG_LEVER_HANDLE, blockState).createInstance(); - indicator = mat.getModel(AllBlockPartials.ANALOG_LEVER_INDICATOR, blockState).createInstance(); + handle = mat.getModel(AllBlockPartials.ANALOG_LEVER_HANDLE).createInstance(); + indicator = mat.getModel(AllBlockPartials.ANALOG_LEVER_INDICATOR).createInstance(); transform(indicator); diff --git a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonInstance.java b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonInstance.java index fc68495df..80ccf0598 100644 --- a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonInstance.java +++ b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonInstance.java @@ -22,8 +22,8 @@ public class SchematicannonInstance extends BlockEntityInstance mat = getTransformMaterial(); - connector = mat.getModel(AllBlockPartials.SCHEMATICANNON_CONNECTOR, blockState).createInstance(); - pipe = mat.getModel(AllBlockPartials.SCHEMATICANNON_PIPE, blockState).createInstance(); + connector = mat.getModel(AllBlockPartials.SCHEMATICANNON_CONNECTOR).createInstance(); + pipe = mat.getModel(AllBlockPartials.SCHEMATICANNON_PIPE).createInstance(); } @Override diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 4c8b47241..5d823cc34 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -32,6 +32,6 @@ Technology that empowers the player.''' [[dependencies.create]] modId="flywheel" mandatory=true - versionRange="[1.18-0.6.2,1.18-0.6.3)" + versionRange="[1.18-0.7.0,1.18-0.7.1)" ordering="AFTER" side="CLIENT"