From e709a8873441f3283337c2ba8c40f0c6e096717b Mon Sep 17 00:00:00 2001 From: BlayTheNinth <1933180+BlayTheNinth@users.noreply.github.com> Date: Sun, 30 Jun 2024 11:39:58 +0200 Subject: [PATCH] fix: Fix auto hammer rendering --- .../client/render/blockentity/AutoHammerRenderer.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/shared/src/main/java/net/blay09/mods/excompressum/client/render/blockentity/AutoHammerRenderer.java b/shared/src/main/java/net/blay09/mods/excompressum/client/render/blockentity/AutoHammerRenderer.java index ff7ace5a..eb60b96b 100644 --- a/shared/src/main/java/net/blay09/mods/excompressum/client/render/blockentity/AutoHammerRenderer.java +++ b/shared/src/main/java/net/blay09/mods/excompressum/client/render/blockentity/AutoHammerRenderer.java @@ -61,7 +61,7 @@ public void render(AutoHammerBlockEntity tileEntity, float partialTicks, PoseSta poseStack.mulPose(tileEntity.getFacing().getRotation()); poseStack.mulPose(new Quaternionf(new AxisAngle4f(Math.toRadians(-90), 0f, 1f, 0f))); - if (tileEntity.shouldAnimate() || true) { + if (tileEntity.shouldAnimate()) { tileEntity.hammerAngle += 0.4f * partialTicks; } @@ -96,15 +96,13 @@ public void render(AutoHammerBlockEntity tileEntity, float partialTicks, PoseSta poseStack.popPose(); - // TODO content is slanted inside - ItemStack currentStack = tileEntity.getCurrentStack(); if (!currentStack.isEmpty()) { BlockState contentState = StupidUtils.getStateFromItemStack(currentStack); if (!contentState.isAir()) { poseStack.pushPose(); - poseStack.translate(-0.09375f, 0.0625f, -0.25); - poseStack.scale(0.5f, 0.5f, 0.5f); + poseStack.translate(-0.4f, -0.04f, -0.2); + poseStack.scale(0.4f, 0.4f, 0.4f); BlockRenderDispatcher dispatcher = Minecraft.getInstance().getBlockRenderer(); dispatcher.renderSingleBlock(contentState, poseStack, buffers, combinedLight, combinedOverlay);