From a36a511a30b6cca9e9266d2ff05c32fd6bdcbeb7 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sun, 16 Apr 2017 09:58:40 +1200 Subject: [PATCH] Make saner values for slime and areaeffectcloud --- .../watchers/AreaEffectCloudWatcher.java | 8 +++++++- .../disguisetypes/watchers/SlimeWatcher.java | 18 +++++++----------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/me/libraryaddict/disguise/disguisetypes/watchers/AreaEffectCloudWatcher.java b/src/me/libraryaddict/disguise/disguisetypes/watchers/AreaEffectCloudWatcher.java index ecf3f631..64b9e18d 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/watchers/AreaEffectCloudWatcher.java +++ b/src/me/libraryaddict/disguise/disguisetypes/watchers/AreaEffectCloudWatcher.java @@ -32,19 +32,25 @@ public class AreaEffectCloudWatcher extends FlagWatcher { } public void setRadius(float radius) { + if (radius > 30) + radius = 30; + setData(MetaIndex.AREA_EFFECT_RADIUS, radius); + sendData(MetaIndex.AREA_EFFECT_RADIUS); } public void setColor(int color) { setData(MetaIndex.AREA_EFFECT_CLOUD_COLOR, color); + sendData(MetaIndex.AREA_EFFECT_CLOUD_COLOR); } public void setIgnoreRadius(boolean ignore) { setData(MetaIndex.AREA_EFFECT_IGNORE_RADIUS, ignore); + sendData(MetaIndex.AREA_EFFECT_IGNORE_RADIUS); } public void setParticleId(int particleId) { setData(MetaIndex.AREA_EFFECT_PARTICLE, particleId); + sendData(MetaIndex.AREA_EFFECT_PARTICLE); } - } diff --git a/src/me/libraryaddict/disguise/disguisetypes/watchers/SlimeWatcher.java b/src/me/libraryaddict/disguise/disguisetypes/watchers/SlimeWatcher.java index 865b415d..25c216db 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/watchers/SlimeWatcher.java +++ b/src/me/libraryaddict/disguise/disguisetypes/watchers/SlimeWatcher.java @@ -4,29 +4,25 @@ import me.libraryaddict.disguise.disguisetypes.Disguise; import me.libraryaddict.disguise.disguisetypes.MetaIndex; import me.libraryaddict.disguise.utilities.DisguiseUtilities; -public class SlimeWatcher extends InsentientWatcher -{ +public class SlimeWatcher extends InsentientWatcher { - public SlimeWatcher(Disguise disguise) - { + public SlimeWatcher(Disguise disguise) { super(disguise); setSize(DisguiseUtilities.random.nextInt(4) + 1); } - public int getSize() - { + public int getSize() { return (int) getData(MetaIndex.SLIME_SIZE); } - public void setSize(int size) - { - if (size <= 0 || size >= 128) - { + public void setSize(int size) { + if (size < 1) { size = 1; + } else if (size > 50) { + size = 50; } setData(MetaIndex.SLIME_SIZE, size); sendData(MetaIndex.SLIME_SIZE); } - }