mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-14 06:24:29 +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
@ -39,7 +39,7 @@ public class ElevatorPulleyRenderer extends KineticBlockEntityRenderer<ElevatorP
|
||||
if (type != null)
|
||||
renderRotatingBuffer(be, getRotatedModel(be, state), ms, buffer.getBuffer(type), light);
|
||||
//
|
||||
|
||||
|
||||
float offset = PulleyRenderer.getBlockEntityOffset(partialTicks, be);
|
||||
boolean running = PulleyRenderer.isPulleyRunning(be);
|
||||
|
||||
@ -50,9 +50,14 @@ public class ElevatorPulleyRenderer extends KineticBlockEntityRenderer<ElevatorP
|
||||
BlockState blockState = be.getBlockState();
|
||||
BlockPos pos = be.getBlockPos();
|
||||
|
||||
float blockStateAngle =
|
||||
180 + AngleHelper.horizontalAngle(blockState.getValue(ElevatorPulleyBlock.HORIZONTAL_FACING));
|
||||
|
||||
SuperByteBuffer magnet = CachedBufferer.partial(AllPartialModels.ELEVATOR_MAGNET, blockState);
|
||||
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);
|
||||
if (offset == 0) {
|
||||
@ -79,7 +84,7 @@ public class ElevatorPulleyRenderer extends KineticBlockEntityRenderer<ElevatorP
|
||||
float f = offset % 1;
|
||||
if (f < .25f || f > .75f) {
|
||||
halfRope.centre()
|
||||
.rotateY(180 + AngleHelper.horizontalAngle(blockState.getValue(ElevatorPulleyBlock.HORIZONTAL_FACING)))
|
||||
.rotateY(blockStateAngle)
|
||||
.unCentre();
|
||||
AbstractPulleyRenderer.renderAt(world,
|
||||
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++) {
|
||||
rope.centre()
|
||||
.rotateY(180 + AngleHelper.horizontalAngle(blockState.getValue(ElevatorPulleyBlock.HORIZONTAL_FACING)))
|
||||
.rotateY(blockStateAngle)
|
||||
.unCentre();
|
||||
AbstractPulleyRenderer.renderAt(world, rope.shiftUVScrolling(beltShift, (float) beltScroll * spriteSize),
|
||||
offset - i, pos, ms, vb);
|
||||
|
@ -182,6 +182,8 @@ public class WaterWheelBlockEntity extends GeneratingKineticBlockEntity {
|
||||
return;
|
||||
|
||||
material = NbtUtils.readBlockState(compound.getCompound("Material"));
|
||||
if (material.isAir())
|
||||
material = Blocks.SPRUCE_PLANKS.defaultBlockState();
|
||||
|
||||
if (clientPacket && prevMaterial != material)
|
||||
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