/** * Gets the current growth state of this nether wart * * @return NetherWartsState of this nether wart */ public NetherWartsState getState() { switch (getData()) { case 0: return NetherWartsState.SEEDED; case 1: return NetherWartsState.STAGE_ONE; case 2: return NetherWartsState.STAGE_TWO; default: return NetherWartsState.RIPE; } }
@Override public String toString() { return getState() + " " + super.toString(); }
/** * Sets the growth state of this nether wart * * @param state New growth state of this nether wart */ public void setState(NetherWartsState state) { switch (state) { case SEEDED: setData((byte) 0x0); return; case STAGE_ONE: setData((byte) 0x1); return; case STAGE_TWO: setData((byte) 0x2); return; case RIPE: setData((byte) 0x3); return; } }
public NetherWarts(NetherWartsState state) { this(); setState(state); }
public NetherWarts(NetherWartsState state) { this(); setState(state); }
@Override public String toString() { return getState() + " " + super.toString(); }
/** * Gets the current growth state of this nether wart * * @return NetherWartsState of this nether wart */ public NetherWartsState getState() { switch (getData()) { case 0: return NetherWartsState.SEEDED; case 1: return NetherWartsState.STAGE_ONE; case 2: return NetherWartsState.STAGE_TWO; default: return NetherWartsState.RIPE; } }
/** * Sets the growth state of this nether wart * * @param state New growth state of this nether wart */ public void setState(NetherWartsState state) { switch (state) { case SEEDED: setData((byte) 0x0); return; case STAGE_ONE: setData((byte) 0x1); return; case STAGE_TWO: setData((byte) 0x2); return; case RIPE: setData((byte) 0x3); return; } }