Skip to content

Commit

Permalink
Don't let people set slime sizes to smaller than 1
Browse files Browse the repository at this point in the history
Backported from 3.0
  • Loading branch information
MachineBreaker authored Nov 22, 2023
1 parent edc1596 commit 925f352
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,9 @@ public void updateEntityMetadata(int entityID, List<EntityData> watchableObjects
if (sizeObject != null) {
Object value = sizeObject.getValue();
if (value instanceof Integer) {
((PacketEntitySizeable) entity).size = (int) value;
((PacketEntitySizeable) entity).size = Math.max((int) value, 1);
} else if (value instanceof Byte) {
((PacketEntitySizeable) entity).size = (byte) value;
((PacketEntitySizeable) entity).size = Math.max((byte) value, 1);
}
}
}
Expand Down

0 comments on commit 925f352

Please sign in to comment.