From bcc4bdd2a2f4df58c9f2b3a8de5ad486bcaa17d7 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Fri, 24 Feb 2017 01:09:03 +1300 Subject: [PATCH] Boat disguise is always generic now --- .../disguisetypes/watchers/BoatWatcher.java | 36 +++++++------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/src/me/libraryaddict/disguise/disguisetypes/watchers/BoatWatcher.java b/src/me/libraryaddict/disguise/disguisetypes/watchers/BoatWatcher.java index 2517614a..bd598305 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/watchers/BoatWatcher.java +++ b/src/me/libraryaddict/disguise/disguisetypes/watchers/BoatWatcher.java @@ -1,63 +1,51 @@ package me.libraryaddict.disguise.disguisetypes.watchers; -import java.util.Random; - import org.bukkit.TreeSpecies; import me.libraryaddict.disguise.disguisetypes.Disguise; -import me.libraryaddict.disguise.disguisetypes.MetaIndex; import me.libraryaddict.disguise.disguisetypes.FlagWatcher; +import me.libraryaddict.disguise.disguisetypes.MetaIndex; -public class BoatWatcher extends FlagWatcher -{ - public BoatWatcher(Disguise disguise) - { +public class BoatWatcher extends FlagWatcher { + public BoatWatcher(Disguise disguise) { super(disguise); - setBoatType(TreeSpecies.values()[new Random().nextInt(6)]); + setBoatType(TreeSpecies.GENERIC); } - public float getDamage() - { + public float getDamage() { return getData(MetaIndex.BOAT_DAMAGE); } - public void setDamage(float dmg) - { + public void setDamage(float dmg) { setData(MetaIndex.BOAT_DAMAGE, dmg); sendData(MetaIndex.BOAT_DAMAGE); } - public void setRightPaddling(boolean rightPaddling) - { + public void setRightPaddling(boolean rightPaddling) { setData(MetaIndex.BOAT_RIGHT_PADDLING, rightPaddling); sendData(MetaIndex.BOAT_RIGHT_PADDLING); } - public void setLeftPaddling(boolean leftPaddling) - { + public void setLeftPaddling(boolean leftPaddling) { setData(MetaIndex.BOAT_LEFT_PADDLING, leftPaddling); sendData(MetaIndex.BOAT_LEFT_PADDLING); } - public boolean isRightPaddling() - { + public boolean isRightPaddling() { return getData(MetaIndex.BOAT_RIGHT_PADDLING); } - public boolean isLeftPaddling() - { + public boolean isLeftPaddling() { return getData(MetaIndex.BOAT_LEFT_PADDLING); } - public void setBoatType(TreeSpecies boatType) - { + public void setBoatType(TreeSpecies boatType) { setData(MetaIndex.BOAT_TYPE, (int) boatType.getData()); sendData(MetaIndex.BOAT_TYPE); } - public TreeSpecies getBoatType() - { + public TreeSpecies getBoatType() { return TreeSpecies.getByData(getData(MetaIndex.BOAT_TYPE).byteValue()); }