Merge leftovers

This commit is contained in:
simibubi 2023-02-25 14:32:51 +01:00
parent d5db85df79
commit f648881987
4 changed files with 12 additions and 12 deletions

View File

@ -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<ModelData> 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

View File

@ -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;
}

View File

@ -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<RollerBlockEntity>
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<RollerBlockEntity>
.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<RollerBlockEntity>
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<RollerBlockEntity>
.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)

View File

@ -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<BakedModel> {
int size = templateQuads.size();
List<BakedQuad> 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);
}