mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-10 12:33:57 +01:00
Implemented Secondary Shaft To Large Renderer
This commit is contained in:
parent
6cd40cc6f9
commit
9920536cc3
@ -38,6 +38,8 @@ public class StandardBogeyRenderer extends BogeyRenderer {
|
|||||||
public void initialiseContraptionModelData(MaterialManager materialManager, BogeySize size) {
|
public void initialiseContraptionModelData(MaterialManager materialManager, BogeySize size) {
|
||||||
// Large
|
// Large
|
||||||
createModelInstances(materialManager, LARGE_BOGEY_WHEELS, BOGEY_DRIVE, BOGEY_PISTON, BOGEY_PIN);
|
createModelInstances(materialManager, LARGE_BOGEY_WHEELS, BOGEY_DRIVE, BOGEY_PISTON, BOGEY_PIN);
|
||||||
|
createModelInstances(materialManager, AllBlocks.SHAFT.getDefaultState()
|
||||||
|
.setValue(ShaftBlock.AXIS, Direction.Axis.X), 2);
|
||||||
// Small
|
// Small
|
||||||
createModelInstances(materialManager, SMALL_BOGEY_WHEELS, 2);
|
createModelInstances(materialManager, SMALL_BOGEY_WHEELS, 2);
|
||||||
createModelInstances(materialManager, BOGEY_FRAME);
|
createModelInstances(materialManager, BOGEY_FRAME);
|
||||||
@ -79,11 +81,23 @@ public class StandardBogeyRenderer extends BogeyRenderer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void renderLarge(CompoundTag bogeyData, float wheelAngle, PoseStack ms, int light,
|
public void renderLarge(CompoundTag bogeyData, float wheelAngle, PoseStack ms, int light,
|
||||||
@Nullable VertexConsumer vb) {
|
@Nullable VertexConsumer vb) {
|
||||||
|
|
||||||
boolean inContraption = vb == null;
|
boolean inContraption = vb == null;
|
||||||
|
|
||||||
|
Transform<?>[] secondaryShafts = getTransformsFromBlockState(AllBlocks.SHAFT.getDefaultState()
|
||||||
|
.setValue(ShaftBlock.AXIS, Direction.Axis.X), ms, inContraption, 2);
|
||||||
|
|
||||||
|
for (int i : Iterate.zeroAndOne) {
|
||||||
|
Transform<?> secondShaft = secondaryShafts[i];
|
||||||
|
secondShaft.translate(-.5f, .25f, .5f + i * -2)
|
||||||
|
.centre()
|
||||||
|
.rotateX(wheelAngle)
|
||||||
|
.unCentre();
|
||||||
|
finalize(secondShaft, ms, light, vb);
|
||||||
|
}
|
||||||
|
|
||||||
Transform<?> bogeyDrive = getTransformFromPartial(BOGEY_DRIVE, ms, inContraption);
|
Transform<?> bogeyDrive = getTransformFromPartial(BOGEY_DRIVE, ms, inContraption);
|
||||||
finalize(bogeyDrive, ms, light, vb);
|
finalize(bogeyDrive, ms, light, vb);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user