Whitespace + general cleanup

By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
Bukkit/Spigot
2011-05-14 23:22:54 +02:00
parent 8217ff1836
commit 855f4133b6
216 changed files with 1649 additions and 1637 deletions

View File

@@ -5,15 +5,15 @@ import org.bukkit.block.BlockFace;
/**
* Represents a pumpkin.
*
*
* @author sunkid
*/
public class Pumpkin extends MaterialData implements Directional {
public Pumpkin() {
super(Material.PUMPKIN);
}
/**
* Instantiate a pumpkin facing in a particular direction.
* @param direction the direction the pumkin's face is facing
@@ -22,7 +22,7 @@ public class Pumpkin extends MaterialData implements Directional {
this();
setFacingDirection(direction);
}
public Pumpkin(final int type) {
super(type);
}
@@ -45,16 +45,20 @@ public class Pumpkin extends MaterialData implements Directional {
public void setFacingDirection(BlockFace face) {
byte data;
switch (face) {
case EAST:
data = 0x0;
break;
case SOUTH:
data = 0x1;
break;
case WEST:
data = 0x2;
break;
case NORTH:
default:
data = 0x3;
@@ -65,19 +69,23 @@ public class Pumpkin extends MaterialData implements Directional {
public BlockFace getFacing() {
byte data = getData();
switch (data) {
case 0x0:
return BlockFace.EAST;
case 0x1:
return BlockFace.SOUTH;
case 0x2:
return BlockFace.WEST;
case 0x3:
default:
return BlockFace.SOUTH;
}
}
@Override
public String toString() {
return super.toString() + " facing " + getFacing() + " " + (isLit() ? "" : "NOT ") + "LIT";