Skip to content

Commit

Permalink
Minimal cleanup technically
Browse files Browse the repository at this point in the history
  • Loading branch information
Superkat32 committed Nov 26, 2024
1 parent b6f6cc9 commit 8e446f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8e446f8

Please sign in to comment.