/** * Set direction of the log * * @param dir - direction of end of log (BlockFace.SELF for no direction) */ public void setDirection(BlockFace dir) { int dat; switch (dir) { case UP: case DOWN: default: dat = 0; break; case WEST: case EAST: dat = 1; break; case NORTH: case SOUTH: dat = 2; break; case SELF: dat = 3; break; } setData((byte) ((getData() & 0x3) | (dat << 2))); }
/** * Sets the species of this tree * * @param species New species of this tree */ public void setSpecies(TreeSpecies species) { setData((byte) ((getData() & 0xC) | species.getData())); }
/** * Set direction of the log * * @param dir - direction of end of log (BlockFace.SELF for no direction) */ public void setDirection(BlockFace dir) { int dat; switch (dir) { case UP: case DOWN: default: dat = 0; break; case WEST: case EAST: dat = 1; break; case NORTH: case SOUTH: dat = 2; break; case SELF: dat = 3; break; } setData((byte) ((getData() & 0x3) | (dat << 2))); }
/** * Sets the species of this tree * * @param species New species of this tree */ public void setSpecies(TreeSpecies species) { setData((byte) ((getData() & 0xC) | species.getData())); }