Ported to 1.7

This commit is contained in:
AlgorithmX2
2014-02-08 19:34:52 -06:00
parent 30c1deb8cf
commit d50c7f6312
328 changed files with 2209 additions and 2311 deletions
+8 -11
View File
@@ -6,7 +6,7 @@ import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.implementations.items.IAEWrench;
import appeng.core.features.AEFeature;
import appeng.items.AEBaseItem;
@@ -26,24 +26,21 @@ public class ToolQuartzWrench extends AEBaseItem implements IAEWrench, IToolWren
@Override
public boolean onItemUseFirst(ItemStack is, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
{
int id = world.getBlockId( x, y, z );
if ( id > 0 && !player.isSneaking() )
Block b = world.getBlock( x, y, z );
if ( b != null && !player.isSneaking() )
{
Block b = Block.blocksList[id];
if ( b != null )
if ( b.rotateBlock( world, x, y, z, ForgeDirection.getOrientation( side ) ) )
{
if ( b.rotateBlock( world, x, y, z, ForgeDirection.getOrientation( side ) ) )
{
player.swingItem();
return !world.isRemote;
}
player.swingItem();
return !world.isRemote;
}
}
return false;
}
@Override
public boolean shouldPassSneakingClickToBlock(World w, int x, int y, int z)
// public boolean shouldPassSneakingClickToBlock(World w, int x, int y, int z)
public boolean doesSneakBypassUse(World world, int x, int y, int z, EntityPlayer player)
{
return true;
}