mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-02 03:16:41 +00:00
Cleanup and a few bugfixes
This commit is contained in:
@ -43,7 +43,7 @@ public class BaseBlock {
|
||||
* @param type
|
||||
*/
|
||||
public BaseBlock(int type) {
|
||||
this.type = (short)type;
|
||||
this.type = (short) type;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -53,22 +53,22 @@ public class BaseBlock {
|
||||
* @param data
|
||||
*/
|
||||
public BaseBlock(int type, int data) {
|
||||
this.type = (short)type;
|
||||
this.data = (byte)data;
|
||||
this.type = (short) type;
|
||||
this.data = (byte) data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the type
|
||||
*/
|
||||
public int getType() {
|
||||
return (int)type;
|
||||
return (int) type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type the type to set
|
||||
*/
|
||||
public void setType(int type) {
|
||||
this.type = (short)type;
|
||||
this.type = (short) type;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -82,7 +82,7 @@ public class BaseBlock {
|
||||
* @param data the data to set
|
||||
*/
|
||||
public void setData(int data) {
|
||||
this.data = (byte)data;
|
||||
this.data = (byte) data;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -98,14 +98,14 @@ public class BaseBlock {
|
||||
* Rotate this block 90 degrees.
|
||||
*/
|
||||
public void rotate90() {
|
||||
data = (byte)BlockData.rotate90(type, data);
|
||||
data = (byte) BlockData.rotate90(type, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rotate this block -90 degrees.
|
||||
*/
|
||||
public void rotate90Reverse() {
|
||||
data = (byte)BlockData.rotate90Reverse(type, data);
|
||||
data = (byte) BlockData.rotate90Reverse(type, data);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -129,8 +129,8 @@ public class BaseBlock {
|
||||
if (!(o instanceof BaseBlock)) {
|
||||
return false;
|
||||
}
|
||||
return (type == ((BaseBlock)o).type)
|
||||
&& (data == ((BaseBlock)o).data || data == -1 || ((BaseBlock)o).data == -1);
|
||||
return (type == ((BaseBlock) o).type)
|
||||
&& (data == ((BaseBlock) o).data || data == -1 || ((BaseBlock) o).data == -1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user