mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-14 22:44:07 +01:00
Bad merge
- Fixed layout of netherite armour textures on this branch - Fixed elevator pulley magnet not rotating with the blockstate
This commit is contained in:
parent
f6f501812e
commit
4924dfda5d
@ -50,9 +50,14 @@ public class ElevatorPulleyRenderer extends KineticBlockEntityRenderer<ElevatorP
|
|||||||
BlockState blockState = be.getBlockState();
|
BlockState blockState = be.getBlockState();
|
||||||
BlockPos pos = be.getBlockPos();
|
BlockPos pos = be.getBlockPos();
|
||||||
|
|
||||||
|
float blockStateAngle =
|
||||||
|
180 + AngleHelper.horizontalAngle(blockState.getValue(ElevatorPulleyBlock.HORIZONTAL_FACING));
|
||||||
|
|
||||||
SuperByteBuffer magnet = CachedBufferer.partial(AllPartialModels.ELEVATOR_MAGNET, blockState);
|
SuperByteBuffer magnet = CachedBufferer.partial(AllPartialModels.ELEVATOR_MAGNET, blockState);
|
||||||
if (running || offset == 0)
|
if (running || offset == 0)
|
||||||
AbstractPulleyRenderer.renderAt(world, magnet, offset, pos, ms, vb);
|
AbstractPulleyRenderer.renderAt(world, magnet.centre()
|
||||||
|
.rotateY(blockStateAngle)
|
||||||
|
.unCentre(), offset, pos, ms, vb);
|
||||||
|
|
||||||
SuperByteBuffer rotatedCoil = getRotatedCoil(be);
|
SuperByteBuffer rotatedCoil = getRotatedCoil(be);
|
||||||
if (offset == 0) {
|
if (offset == 0) {
|
||||||
@ -79,7 +84,7 @@ public class ElevatorPulleyRenderer extends KineticBlockEntityRenderer<ElevatorP
|
|||||||
float f = offset % 1;
|
float f = offset % 1;
|
||||||
if (f < .25f || f > .75f) {
|
if (f < .25f || f > .75f) {
|
||||||
halfRope.centre()
|
halfRope.centre()
|
||||||
.rotateY(180 + AngleHelper.horizontalAngle(blockState.getValue(ElevatorPulleyBlock.HORIZONTAL_FACING)))
|
.rotateY(blockStateAngle)
|
||||||
.unCentre();
|
.unCentre();
|
||||||
AbstractPulleyRenderer.renderAt(world,
|
AbstractPulleyRenderer.renderAt(world,
|
||||||
halfRope.shiftUVScrolling(beltShift, (float) beltScroll * spriteSize), f > .75f ? f - 1 : f, pos, ms,
|
halfRope.shiftUVScrolling(beltShift, (float) beltScroll * spriteSize), f > .75f ? f - 1 : f, pos, ms,
|
||||||
@ -91,7 +96,7 @@ public class ElevatorPulleyRenderer extends KineticBlockEntityRenderer<ElevatorP
|
|||||||
|
|
||||||
for (int i = 0; i < offset - .25f; i++) {
|
for (int i = 0; i < offset - .25f; i++) {
|
||||||
rope.centre()
|
rope.centre()
|
||||||
.rotateY(180 + AngleHelper.horizontalAngle(blockState.getValue(ElevatorPulleyBlock.HORIZONTAL_FACING)))
|
.rotateY(blockStateAngle)
|
||||||
.unCentre();
|
.unCentre();
|
||||||
AbstractPulleyRenderer.renderAt(world, rope.shiftUVScrolling(beltShift, (float) beltScroll * spriteSize),
|
AbstractPulleyRenderer.renderAt(world, rope.shiftUVScrolling(beltShift, (float) beltScroll * spriteSize),
|
||||||
offset - i, pos, ms, vb);
|
offset - i, pos, ms, vb);
|
||||||
|
@ -182,6 +182,8 @@ public class WaterWheelBlockEntity extends GeneratingKineticBlockEntity {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
material = NbtUtils.readBlockState(compound.getCompound("Material"));
|
material = NbtUtils.readBlockState(compound.getCompound("Material"));
|
||||||
|
if (material.isAir())
|
||||||
|
material = Blocks.SPRUCE_PLANKS.defaultBlockState();
|
||||||
|
|
||||||
if (clientPacket && prevMaterial != material)
|
if (clientPacket && prevMaterial != material)
|
||||||
redraw();
|
redraw();
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 778 B |
Binary file not shown.
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 471 B |
Loading…
Reference in New Issue
Block a user