diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/fan/EncasedFanRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/fan/EncasedFanRenderer.java index cd624dcfe..62ca3e645 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/fan/EncasedFanRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/fan/EncasedFanRenderer.java @@ -41,7 +41,24 @@ public class EncasedFanRenderer extends KineticTileEntityRenderer { InstanceBuffer fanInner = AllBlockPartials.ENCASED_FAN_INNER.renderOnDirectionalSouthRotating(ctx, te.getBlockState(), direction.getOpposite()); - renderRotatingBuffer(ctx, shaftHalf); + shaftHalf.setupInstance(data -> { + final BlockPos pos = te.getPos(); + Direction.Axis axis = ((IRotate) te.getBlockState() + .getBlock()).getRotationAxis(te.getBlockState()); + data.setRotationalSpeed(te.getSpeed()) + .setRotationOffset(getRotationOffsetForPosition(te, pos, axis)) + .setRotationAxis(Direction.getFacingFromAxis(Direction.AxisDirection.POSITIVE, axis).getUnitVector()) + .setTileEntity(te); + + if (ctx.checkWorldLight()) { + BlockPos behind = te.getPos().offset(direction.getOpposite()); + int blockLight = te.getWorld().getLightLevel(LightType.BLOCK, behind); + int skyLight = te.getWorld().getLightLevel(LightType.SKY, behind); + + data.setBlockLight(blockLight) + .setSkyLight(skyLight); + } + }); fanInner.setupInstance(data -> { final BlockPos pos = te.getPos(); Direction.Axis axis = ((IRotate) te.getBlockState()