Skip to content

Commit

Permalink
fix tiny entities not going back to normal
Browse files Browse the repository at this point in the history
  • Loading branch information
UpcraftLP committed Mar 8, 2024
1 parent 8cda5ac commit eff54c3
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ public void serverTick() {
if(entity instanceof PlayerEntity || (entity instanceof TameableEntity tameable && tameable.getOwnerUuid() != null)) {
if(timer <= 0) {
float normalHeight = ScaleTypes.HEIGHT.getDefaultBaseScale() / ScaleTypes.HEIGHT.getScaleData(entity).getBaseScale();
Box box = new Box(entity.getBoundingBox().minX, entity.getBoundingBox().minY, entity.getBoundingBox().minZ, entity.getBoundingBox().maxX, entity.getBoundingBox().maxY * normalHeight, entity.getBoundingBox().maxZ);

if(entity.getWorld().isSpaceEmpty(entity, box) || ScaleTypes.HEIGHT.getScaleData(entity).getBaseScale() > ScaleTypes.HEIGHT.getDefaultBaseScale())
if(entity.getHeight() > normalHeight || entity.getWorld().isSpaceEmpty(entity, new Box(entity.getBoundingBox().minX, entity.getBoundingBox().minY, entity.getBoundingBox().minZ, entity.getBoundingBox().maxX, entity.getBoundingBox().maxY * normalHeight, entity.getBoundingBox().maxZ)))
resetScale();
}
else {
Expand Down

0 comments on commit eff54c3

Please sign in to comment.