mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-01-06 01:23:42 +01:00
Merge leftovers
This commit is contained in:
parent
d5db85df79
commit
f648881987
4 changed files with 12 additions and 12 deletions
|
@ -6,7 +6,7 @@ import com.jozufozu.flywheel.core.Materials;
|
||||||
import com.jozufozu.flywheel.core.PartialModel;
|
import com.jozufozu.flywheel.core.PartialModel;
|
||||||
import com.jozufozu.flywheel.core.materials.model.ModelData;
|
import com.jozufozu.flywheel.core.materials.model.ModelData;
|
||||||
import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld;
|
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 com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
||||||
|
|
||||||
import net.minecraft.world.phys.Vec3;
|
import net.minecraft.world.phys.Vec3;
|
||||||
|
@ -23,7 +23,7 @@ public class RollerActorInstance extends HarvesterActorInstance {
|
||||||
|
|
||||||
Material<ModelData> material = materialManager.defaultCutout()
|
Material<ModelData> material = materialManager.defaultCutout()
|
||||||
.material(Materials.TRANSFORMED);
|
.material(Materials.TRANSFORMED);
|
||||||
frame = material.getModel(AllBlockPartials.ROLLER_FRAME, context.state)
|
frame = material.getModel(AllPartialModels.ROLLER_FRAME, context.state)
|
||||||
.createInstance();
|
.createInstance();
|
||||||
frame.setBlockLight(localBlockLight());
|
frame.setBlockLight(localBlockLight());
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ public class RollerActorInstance extends HarvesterActorInstance {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected PartialModel getRollingPartial() {
|
protected PartialModel getRollingPartial() {
|
||||||
return AllBlockPartials.ROLLER_WHEEL;
|
return AllPartialModels.ROLLER_WHEEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -298,7 +298,7 @@ public class RollerMovementBehaviour extends BlockBreakingMovementBehaviour {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
while (paveResult == PaveResult.PASS) {
|
while (paveResult == PaveResult.PASS) {
|
||||||
if (yOffset > AllConfigs.SERVER.kinetics.rollerFillDepth.get()) {
|
if (yOffset > AllConfigs.server().kinetics.rollerFillDepth.get()) {
|
||||||
paveResult = PaveResult.FAIL;
|
paveResult = PaveResult.FAIL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ import static net.minecraft.world.level.block.state.properties.BlockStatePropert
|
||||||
|
|
||||||
import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld;
|
import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld;
|
||||||
import com.mojang.blaze3d.vertex.PoseStack;
|
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.MovementContext;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionMatrices;
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionMatrices;
|
||||||
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
|
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
|
||||||
|
@ -38,7 +38,7 @@ public class RollerRenderer extends SmartBlockEntityRenderer<RollerBlockEntity>
|
||||||
|
|
||||||
ms.pushPose();
|
ms.pushPose();
|
||||||
ms.translate(0, -.25, 0);
|
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);
|
.translate(0, .25, 0);
|
||||||
Direction facing = blockState.getValue(RollerBlock.FACING);
|
Direction facing = blockState.getValue(RollerBlock.FACING);
|
||||||
HarvesterRenderer.transform(be.getLevel(), facing, superBuffer, be.getAnimatedSpeed(), PIVOT);
|
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()));
|
.renderInto(ms, buffer.getBuffer(RenderType.cutoutMipped()));
|
||||||
ms.popPose();
|
ms.popPose();
|
||||||
|
|
||||||
CachedBufferer.partial(AllBlockPartials.ROLLER_FRAME, blockState)
|
CachedBufferer.partial(AllPartialModels.ROLLER_FRAME, blockState)
|
||||||
.rotateCentered(Direction.UP, AngleHelper.rad(AngleHelper.horizontalAngle(facing)))
|
.rotateCentered(Direction.UP, AngleHelper.rad(AngleHelper.horizontalAngle(facing)))
|
||||||
.light(light)
|
.light(light)
|
||||||
.renderInto(ms, buffer.getBuffer(RenderType.solid()));
|
.renderInto(ms, buffer.getBuffer(RenderType.solid()));
|
||||||
|
@ -56,7 +56,7 @@ public class RollerRenderer extends SmartBlockEntityRenderer<RollerBlockEntity>
|
||||||
ContraptionMatrices matrices, MultiBufferSource buffers) {
|
ContraptionMatrices matrices, MultiBufferSource buffers) {
|
||||||
BlockState blockState = context.state;
|
BlockState blockState = context.state;
|
||||||
Direction facing = blockState.getValue(HORIZONTAL_FACING);
|
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())
|
float speed = (float) (!VecHelper.isVecPointingTowards(context.relativeMotion, facing.getOpposite())
|
||||||
? context.getAnimationSpeed()
|
? context.getAnimationSpeed()
|
||||||
: -context.getAnimationSpeed());
|
: -context.getAnimationSpeed());
|
||||||
|
@ -75,7 +75,7 @@ public class RollerRenderer extends SmartBlockEntityRenderer<RollerBlockEntity>
|
||||||
.renderInto(viewProjection, buffers.getBuffer(RenderType.cutoutMipped()));
|
.renderInto(viewProjection, buffers.getBuffer(RenderType.cutoutMipped()));
|
||||||
viewProjection.popPose();
|
viewProjection.popPose();
|
||||||
|
|
||||||
CachedBufferer.partial(AllBlockPartials.ROLLER_FRAME, blockState)
|
CachedBufferer.partial(AllPartialModels.ROLLER_FRAME, blockState)
|
||||||
.transform(matrices.getModel())
|
.transform(matrices.getModel())
|
||||||
.rotateCentered(Direction.UP, AngleHelper.rad(AngleHelper.horizontalAngle(facing)))
|
.rotateCentered(Direction.UP, AngleHelper.rad(AngleHelper.horizontalAngle(facing)))
|
||||||
.light(matrices.getWorld(), contraptionWorldLight)
|
.light(matrices.getWorld(), contraptionWorldLight)
|
||||||
|
|
|
@ -5,7 +5,7 @@ import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.function.UnaryOperator;
|
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 com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||||
|
@ -65,10 +65,10 @@ public class TrackModel extends BakedModelWrapper<BakedModel> {
|
||||||
int size = templateQuads.size();
|
int size = templateQuads.size();
|
||||||
List<BakedQuad> quads = new ArrayList<>();
|
List<BakedQuad> quads = new ArrayList<>();
|
||||||
for (int i = 0; i < size; i++) {
|
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();
|
int[] vertexData = quad.getVertices();
|
||||||
for (int j = 0; j < 4; j++)
|
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);
|
quads.add(quad);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue