Tiny hats

- Fix train hat on smouldering blaze burner
- Fix blaze burners on contraptions tracking invisible players
This commit is contained in:
PepperCode1 2022-07-08 19:40:30 -07:00
parent 954f098cd1
commit d59e748c01
2 changed files with 12 additions and 3 deletions

View file

@ -83,7 +83,7 @@ public class BlazeBurnerMovementBehaviour implements MovementBehaviour {
}
Entity player = Minecraft.getInstance().cameraEntity;
if (player != null) {
if (player != null && !player.isInvisible()) {
Vec3 applyRotation = context.contraption.entity.reverseRotation(player.position()
.subtract(context.position), 1);
double dx = applyRotation.x;

View file

@ -125,10 +125,19 @@ public class BlazeBurnerRenderer extends SafeTileEntityRenderer<BlazeBurnerTileE
.translate(0, headY + 8 / 16f, 0), horizontalAngle, modelTransform, ms, solid);
if (drawHat) {
SuperByteBuffer partial = CachedBufferer.partial(AllBlockPartials.TRAIN_HAT, blockState);
SuperByteBuffer partial = CachedBufferer.partial(AllBlockPartials.TRAIN_HAT, blockState)
.translate(0, headY, 0);
if (blazeModel == AllBlockPartials.BLAZE_INERT) {
partial.translateY(0.5f)
.centre()
.scale(0.75f)
.unCentre();
} else {
partial.translateY(0.75f);
}
if (modelTransform != null)
partial.transform(modelTransform);
partial.translate(0, headY + 0.75f, 0)
partial
.rotateCentered(Direction.UP, horizontalAngle + Mth.PI)
.translate(0.5f, 0, 0.5f)
.light(LightTexture.FULL_BRIGHT)