Beispiel #1
0
 /**
  * Creates a block of specified type and specified x, y and z
  *
  * @param type Type of block
  * @param x
  * @param y
  * @param z
  */
 public Block(int type, int x, int y, int z) {
   this.type = type;
   blockType = Type.fromId(type);
   this.x = x;
   this.y = y;
   this.z = z;
 }
Beispiel #2
0
 /**
  * Creates a block of specified type and specified x, y and z
  *
  * @param type Type of block
  * @param x
  * @param y
  * @param z
  * @param data
  */
 public Block(int type, int x, int y, int z, int data) {
   this.type = type;
   blockType = Type.fromId(type);
   this.x = x;
   this.y = y;
   this.z = z;
   this.data = data;
 }
Beispiel #3
0
 public static Type parseType(String msg) {
   int a = hexNum(msg.charAt(1));
   int b = hexNum(msg.charAt(2));
   if (a < 0 || b < 0) {
     return null;
   }
   int t = (a << 4) | (b & 0x0f);
   return Type.fromId(t);
 }
Beispiel #4
0
 /**
  * Set type of enchantment Note that it does NOT check for validity of the enchantment!!!
  *
  * @param type
  */
 public void setType(int type) {
   this.type = Type.fromId(type);
 }
Beispiel #5
0
 /**
  * Set type of block
  *
  * @param type
  */
 public void setType(int type) {
   blockType = Type.fromId(type);
   this.type = type;
 }
Beispiel #6
0
 /**
  * Creates a block of specified type
  *
  * @param type
  */
 public Block(int type) {
   this.type = type;
   blockType = Type.fromId(type);
 }