Clamp the slime size value, don't let them do negative sizes.

This commit is contained in:
libraryaddict 2014-05-23 11:31:36 +12:00
parent 9f5cfca723
commit eb712a06b9

View File

@ -16,6 +16,9 @@ public class SlimeWatcher extends LivingWatcher {
}
public void setSize(int size) {
if (size <= 0 || size >= 128) {
size = 1;
}
setValue(16, (byte) size);
sendData(16);
}