mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-27 23:33:15 +00:00
remove out commentec code
run SA
This commit is contained in:
795 files changed
+33663
-37253
No files matched your search
@@ -9,10 +9,8 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockOrientable extends BlockContainer
|
||||
{
|
||||
public BlockOrientable()
|
||||
{
|
||||
public class BlockOrientable extends BlockContainer {
|
||||
public BlockOrientable() {
|
||||
super(Material.rock);
|
||||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
@@ -20,56 +18,45 @@ public class BlockOrientable extends BlockContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int dunno)
|
||||
{
|
||||
public TileEntity createNewTileEntity(World world, int dunno) {
|
||||
return new TEOrientable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float what, float these, float are)
|
||||
{
|
||||
//Right-click orients the output face. Shift-right-click orients the input face.
|
||||
if (world.isRemote)
|
||||
{
|
||||
public boolean onBlockActivated(
|
||||
World world, int x, int y, int z, EntityPlayer player, int side, float what, float these, float are) {
|
||||
// Right-click orients the output face. Shift-right-click orients the input face.
|
||||
if (world.isRemote) {
|
||||
return false;
|
||||
}
|
||||
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if (tile instanceof TEOrientable)
|
||||
{
|
||||
if (tile instanceof TEOrientable) {
|
||||
TEOrientable newTile = (TEOrientable) tile;
|
||||
if (player.isSneaking())
|
||||
{
|
||||
if (player.isSneaking()) {
|
||||
int nextSide = TEOrientable.getIntForForgeDirection(newTile.getInputDirection()) + 1;
|
||||
|
||||
if (nextSide > 5)
|
||||
{
|
||||
if (nextSide > 5) {
|
||||
nextSide = 0;
|
||||
}
|
||||
if (ForgeDirection.getOrientation(nextSide) == newTile.getOutputDirection())
|
||||
{
|
||||
if (ForgeDirection.getOrientation(nextSide) == newTile.getOutputDirection()) {
|
||||
nextSide++;
|
||||
if (nextSide > 5)
|
||||
{
|
||||
if (nextSide > 5) {
|
||||
nextSide = 0;
|
||||
}
|
||||
}
|
||||
|
||||
newTile.setInputDirection(ForgeDirection.getOrientation(nextSide));
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
int nextSide = TEOrientable.getIntForForgeDirection(newTile.getOutputDirection()) + 1;
|
||||
|
||||
if (nextSide > 5)
|
||||
{
|
||||
if (nextSide > 5) {
|
||||
nextSide = 0;
|
||||
}
|
||||
if (ForgeDirection.getOrientation(nextSide) == newTile.getInputDirection())
|
||||
{
|
||||
if (ForgeDirection.getOrientation(nextSide) == newTile.getInputDirection()) {
|
||||
nextSide++;
|
||||
if (nextSide > 5)
|
||||
{
|
||||
if (nextSide > 5) {
|
||||
nextSide = 0;
|
||||
}
|
||||
}
|
||||
@@ -83,8 +70,7 @@ public class BlockOrientable extends BlockContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int metadata)
|
||||
{
|
||||
public int damageDropped(int metadata) {
|
||||
return metadata;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user