From f648881987462b7be8cea3698ae072090bdd001c Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Sat, 25 Feb 2023 14:32:51 +0100 Subject: [PATCH] Merge leftovers --- .../components/actors/RollerActorInstance.java | 6 +++--- .../components/actors/RollerMovementBehaviour.java | 2 +- .../contraptions/components/actors/RollerRenderer.java | 10 +++++----- .../content/logistics/trains/track/TrackModel.java | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/RollerActorInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/RollerActorInstance.java index 304a78b28..aaf8005fd 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/RollerActorInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/RollerActorInstance.java @@ -6,7 +6,7 @@ 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.virtual.VirtualRenderWorld; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import net.minecraft.world.phys.Vec3; @@ -23,7 +23,7 @@ public class RollerActorInstance extends HarvesterActorInstance { Material material = materialManager.defaultCutout() .material(Materials.TRANSFORMED); - frame = material.getModel(AllBlockPartials.ROLLER_FRAME, context.state) + frame = material.getModel(AllPartialModels.ROLLER_FRAME, context.state) .createInstance(); frame.setBlockLight(localBlockLight()); } @@ -40,7 +40,7 @@ public class RollerActorInstance extends HarvesterActorInstance { @Override protected PartialModel getRollingPartial() { - return AllBlockPartials.ROLLER_WHEEL; + return AllPartialModels.ROLLER_WHEEL; } @Override diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/RollerMovementBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/RollerMovementBehaviour.java index 9ecfe52c8..cd33b8035 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/RollerMovementBehaviour.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/RollerMovementBehaviour.java @@ -298,7 +298,7 @@ public class RollerMovementBehaviour extends BlockBreakingMovementBehaviour { return; while (paveResult == PaveResult.PASS) { - if (yOffset > AllConfigs.SERVER.kinetics.rollerFillDepth.get()) { + if (yOffset > AllConfigs.server().kinetics.rollerFillDepth.get()) { paveResult = PaveResult.FAIL; break; } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/RollerRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/RollerRenderer.java index c9a7caf65..7cfee53e0 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/RollerRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/RollerRenderer.java @@ -4,7 +4,7 @@ import static net.minecraft.world.level.block.state.properties.BlockStatePropert import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld; import com.mojang.blaze3d.vertex.PoseStack; -import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionMatrices; import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher; @@ -38,7 +38,7 @@ public class RollerRenderer extends SmartBlockEntityRenderer ms.pushPose(); ms.translate(0, -.25, 0); - SuperByteBuffer superBuffer = CachedBufferer.partial(AllBlockPartials.ROLLER_WHEEL, blockState) + SuperByteBuffer superBuffer = CachedBufferer.partial(AllPartialModels.ROLLER_WHEEL, blockState) .translate(0, .25, 0); Direction facing = blockState.getValue(RollerBlock.FACING); HarvesterRenderer.transform(be.getLevel(), facing, superBuffer, be.getAnimatedSpeed(), PIVOT); @@ -46,7 +46,7 @@ public class RollerRenderer extends SmartBlockEntityRenderer .renderInto(ms, buffer.getBuffer(RenderType.cutoutMipped())); ms.popPose(); - CachedBufferer.partial(AllBlockPartials.ROLLER_FRAME, blockState) + CachedBufferer.partial(AllPartialModels.ROLLER_FRAME, blockState) .rotateCentered(Direction.UP, AngleHelper.rad(AngleHelper.horizontalAngle(facing))) .light(light) .renderInto(ms, buffer.getBuffer(RenderType.solid())); @@ -56,7 +56,7 @@ public class RollerRenderer extends SmartBlockEntityRenderer ContraptionMatrices matrices, MultiBufferSource buffers) { BlockState blockState = context.state; Direction facing = blockState.getValue(HORIZONTAL_FACING); - SuperByteBuffer superBuffer = CachedBufferer.partial(AllBlockPartials.ROLLER_WHEEL, blockState); + SuperByteBuffer superBuffer = CachedBufferer.partial(AllPartialModels.ROLLER_WHEEL, blockState); float speed = (float) (!VecHelper.isVecPointingTowards(context.relativeMotion, facing.getOpposite()) ? context.getAnimationSpeed() : -context.getAnimationSpeed()); @@ -75,7 +75,7 @@ public class RollerRenderer extends SmartBlockEntityRenderer .renderInto(viewProjection, buffers.getBuffer(RenderType.cutoutMipped())); viewProjection.popPose(); - CachedBufferer.partial(AllBlockPartials.ROLLER_FRAME, blockState) + CachedBufferer.partial(AllPartialModels.ROLLER_FRAME, blockState) .transform(matrices.getModel()) .rotateCentered(Direction.UP, AngleHelper.rad(AngleHelper.horizontalAngle(facing))) .light(matrices.getWorld(), contraptionWorldLight) diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackModel.java b/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackModel.java index ab6606118..30f869f08 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackModel.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/track/TrackModel.java @@ -5,7 +5,7 @@ import java.util.List; import java.util.Random; import java.util.function.UnaryOperator; -import com.simibubi.create.foundation.block.render.QuadHelper; +import com.simibubi.create.foundation.model.BakedQuadHelper; import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.client.renderer.block.model.BakedQuad; @@ -65,10 +65,10 @@ public class TrackModel extends BakedModelWrapper { int size = templateQuads.size(); List quads = new ArrayList<>(); for (int i = 0; i < size; i++) { - BakedQuad quad = QuadHelper.clone(templateQuads.get(i)); + BakedQuad quad = BakedQuadHelper.clone(templateQuads.get(i)); int[] vertexData = quad.getVertices(); for (int j = 0; j < 4; j++) - QuadHelper.setXYZ(vertexData, j, transform.apply(QuadHelper.getXYZ(vertexData, j))); + BakedQuadHelper.setXYZ(vertexData, j, transform.apply(BakedQuadHelper.getXYZ(vertexData, j))); quads.add(quad); }