From 8e446f87f262a5985f435bb78fb2e796efebdf91 Mon Sep 17 00:00:00 2001 From: Superkat32 Date: Tue, 26 Nov 2024 18:38:04 -0500 Subject: [PATCH] Minimal cleanup technically --- .../glowcase/block/entity/EntityDisplayBlockEntity.java | 4 ++-- .../render/block/entity/EntityDisplayBlockEntityRenderer.java | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/dev/hephaestus/glowcase/block/entity/EntityDisplayBlockEntity.java b/src/main/java/dev/hephaestus/glowcase/block/entity/EntityDisplayBlockEntity.java index 0ef36a0..35fa3a3 100644 --- a/src/main/java/dev/hephaestus/glowcase/block/entity/EntityDisplayBlockEntity.java +++ b/src/main/java/dev/hephaestus/glowcase/block/entity/EntityDisplayBlockEntity.java @@ -64,8 +64,8 @@ public Entity getDisplayEntity() { if (this.displayEntity == null && this.world != null && this.stack.getItem() instanceof SpawnEggItem eggItem) { this.displayEntity = eggItem.getEntityType(this.stack).create(this.world); if(shouldEditScale && this.displayEntity != null) { - //make the default scale of the entity the same size as the block, - //but only if the player hasn't edited the scale value themselves + //make the default scale of the entity the roughly same size as the block + //shouldEditScale gets set to true after changing the entity float calcScale = displayEntity.getHeight() >= displayEntity.getWidth() ? 1F / displayEntity.getHeight() : 0.5F; float roundedScale = (float) Math.round(calcScale / 0.125f) * 0.125f; if(Math.abs(roundedScale) > 3) { diff --git a/src/main/java/dev/hephaestus/glowcase/client/render/block/entity/EntityDisplayBlockEntityRenderer.java b/src/main/java/dev/hephaestus/glowcase/client/render/block/entity/EntityDisplayBlockEntityRenderer.java index 2ed6e35..6b1f98c 100644 --- a/src/main/java/dev/hephaestus/glowcase/client/render/block/entity/EntityDisplayBlockEntityRenderer.java +++ b/src/main/java/dev/hephaestus/glowcase/client/render/block/entity/EntityDisplayBlockEntityRenderer.java @@ -2,7 +2,6 @@ import dev.hephaestus.glowcase.Glowcase; import dev.hephaestus.glowcase.block.entity.EntityDisplayBlockEntity; -import dev.hephaestus.glowcase.block.entity.ItemDisplayBlockEntity; import dev.hephaestus.glowcase.client.util.BlockEntityRenderUtil; import net.minecraft.client.MinecraftClient; import net.minecraft.client.font.TextRenderer.TextLayerType;