Make saner values for slime and areaeffectcloud

This commit is contained in:
libraryaddict 2017-04-16 09:58:40 +12:00
parent 7a2d360528
commit a36a511a30
2 changed files with 14 additions and 12 deletions

View File

@ -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);
}
}

View File

@ -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);
}
}