Always use {}

This commit is contained in:
yueh 2016-01-01 01:49:05 +01:00
parent ab689f2a48
commit e5d6a40511
2 changed files with 8 additions and 0 deletions

View file

@ -68,7 +68,9 @@ public enum AEPartLocation
public static AEPartLocation fromOrdinal( final int id ) public static AEPartLocation fromOrdinal( final int id )
{ {
if( id >= 0 && id < SIDE_LOCATIONS.length ) if( id >= 0 && id < SIDE_LOCATIONS.length )
{
return SIDE_LOCATIONS[id]; return SIDE_LOCATIONS[id];
}
return INTERNAL; return INTERNAL;
} }
@ -82,7 +84,9 @@ public enum AEPartLocation
public static AEPartLocation fromFacing( final EnumFacing side ) public static AEPartLocation fromFacing( final EnumFacing side )
{ {
if( side == null ) if( side == null )
{
return INTERNAL; return INTERNAL;
}
return values()[side.ordinal()]; return values()[side.ordinal()];
} }

View file

@ -412,7 +412,9 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
public EnumFacing getForward() public EnumFacing getForward()
{ {
if( forward == null ) if( forward == null )
{
return EnumFacing.NORTH; return EnumFacing.NORTH;
}
return this.forward; return this.forward;
} }
@ -420,7 +422,9 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
public EnumFacing getUp() public EnumFacing getUp()
{ {
if( up == null ) if( up == null )
{
return EnumFacing.UP; return EnumFacing.UP;
}
return this.up; return this.up;
} }