Skip to content

Commit

Permalink
Merge pull request #1222 from GrimAnticheat/2.0-slime-size-fix
Browse files Browse the repository at this point in the history
Don't let people set slime sizes to smaller than 1
  • Loading branch information
AoElite authored Nov 22, 2023
2 parents edc1596 + 925f352 commit 7c58dc7
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 7c58dc7

Please sign in to comment.