From 925f35227c3211b9fd63068e180700b0e5a25c10 Mon Sep 17 00:00:00 2001 From: MachineBreaker Date: Wed, 22 Nov 2023 06:13:08 -0400 Subject: [PATCH] Don't let people set slime sizes to smaller than 1 Backported from 3.0 --- .../ac/grim/grimac/utils/latency/CompensatedEntities.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/ac/grim/grimac/utils/latency/CompensatedEntities.java b/src/main/java/ac/grim/grimac/utils/latency/CompensatedEntities.java index 1a6e9edc9a..cf82b77eae 100644 --- a/src/main/java/ac/grim/grimac/utils/latency/CompensatedEntities.java +++ b/src/main/java/ac/grim/grimac/utils/latency/CompensatedEntities.java @@ -279,9 +279,9 @@ public void updateEntityMetadata(int entityID, List 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); } } }