Basic reformat, hit once, hope never again

This commit is contained in:
thatsIch
2015-04-03 08:54:31 +02:00
parent 4ff1631f89
commit d34c988c88
886 changed files with 31400 additions and 30990 deletions
+19 -16
View File
@@ -18,12 +18,14 @@
package appeng.helpers;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.util.IOrientable;
public class MetaRotation implements IOrientable
{
@@ -32,7 +34,8 @@ public class MetaRotation implements IOrientable
final int y;
final int z;
public MetaRotation(IBlockAccess world, int x, int y, int z) {
public MetaRotation( IBlockAccess world, int x, int y, int z )
{
this.w = world;
this.x = x;
this.y = y;
@@ -40,12 +43,17 @@ public class MetaRotation implements IOrientable
}
@Override
public void setOrientation(ForgeDirection Forward, ForgeDirection Up)
public boolean canBeRotated()
{
if ( this.w instanceof World )
((World) this.w).setBlockMetadataWithNotify( this.x, this.y, this.z, Up.ordinal(), 1 + 2 );
else
throw new RuntimeException( this.w.getClass().getName() + " received, expected World" );
return true;
}
@Override
public ForgeDirection getForward()
{
if( this.getUp().offsetY == 0 )
return ForgeDirection.UP;
return ForgeDirection.SOUTH;
}
@Override
@@ -55,16 +63,11 @@ public class MetaRotation implements IOrientable
}
@Override
public ForgeDirection getForward()
public void setOrientation( ForgeDirection Forward, ForgeDirection Up )
{
if ( this.getUp().offsetY == 0 )
return ForgeDirection.UP;
return ForgeDirection.SOUTH;
}
@Override
public boolean canBeRotated()
{
return true;
if( this.w instanceof World )
( (World) this.w ).setBlockMetadataWithNotify( this.x, this.y, this.z, Up.ordinal(), 1 + 2 );
else
throw new RuntimeException( this.w.getClass().getName() + " received, expected World" );
}
}