Attempt to fix repository

This commit is contained in:
WayofTime committed 2015-07-31 12:09:09 -04:00
1 parent e242207d50
commit 1aac4686db
932 files changed
+39272 -11544

No files matched your search

@@ -1,14 +1,13 @@
package WayofTime.alchemicalWizardry.common.block;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.tileEntity.TEOrientable;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class BlockOrientable extends BlockContainer
{
@@ -17,6 +16,7 @@ public class BlockOrientable extends BlockContainer
super(Material.rock);
setHardness(2.0F);
setResistance(5.0F);
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
}
@Override
@@ -26,7 +26,7 @@ public class BlockOrientable extends BlockContainer
}
@Override
public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ)
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)
@@ -34,20 +34,20 @@ public class BlockOrientable extends BlockContainer
return false;
}
TileEntity tile = world.getTileEntity(blockPos);
TileEntity tile = world.getTileEntity(x, y, z);
if (tile instanceof TEOrientable)
{
TEOrientable newTile = (TEOrientable) tile;
if (player.isSneaking())
{
int nextSide = TEOrientable.getIntForEnumFacing(newTile.getInputDirection()) + 1;
int nextSide = TEOrientable.getIntForForgeDirection(newTile.getInputDirection()) + 1;
if (nextSide > 5)
{
nextSide = 0;
}
if (EnumFacing.getFront(nextSide) == newTile.getOutputDirection())
if (ForgeDirection.getOrientation(nextSide) == newTile.getOutputDirection())
{
nextSide++;
if (nextSide > 5)
@@ -56,16 +56,16 @@ public class BlockOrientable extends BlockContainer
}
}
newTile.setInputDirection(EnumFacing.getFront(nextSide));
newTile.setInputDirection(ForgeDirection.getOrientation(nextSide));
} else
{
int nextSide = TEOrientable.getIntForEnumFacing(newTile.getOutputDirection()) + 1;
int nextSide = TEOrientable.getIntForForgeDirection(newTile.getOutputDirection()) + 1;
if (nextSide > 5)
{
nextSide = 0;
}
if (EnumFacing.getFront(nextSide) == newTile.getInputDirection())
if (ForgeDirection.getOrientation(nextSide) == newTile.getInputDirection())
{
nextSide++;
if (nextSide > 5)
@@ -74,17 +74,17 @@ public class BlockOrientable extends BlockContainer
}
}
newTile.setOutputDirection(EnumFacing.getFront(nextSide));
newTile.setOutputDirection(ForgeDirection.getOrientation(nextSide));
}
}
world.markBlockForUpdate(blockPos);
world.markBlockForUpdate(x, y, z);
return true;
}
@Override
public int damageDropped(IBlockState blockState)
public int damageDropped(int metadata)
{
return blockState.getBlock().damageDropped(blockState);
return metadata;
}
}