mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 12:42:57 +00:00
moar fixes
This commit is contained in:
1 parent
3cc541e872
commit
f52b2f6f08
21 files changed
+724
-722
No files matched your search
@@ -495,10 +495,10 @@ public class AbilityHelper
|
||||
return true;
|
||||
}
|
||||
|
||||
int bID = world.getBlockId(x, y, z);
|
||||
int bIDabove = world.getBlockId(x, y + 1, z);
|
||||
Block b = world.getBlockId(x, y, z);
|
||||
Block babove = world.getBlockId(x, y + 1, z);
|
||||
|
||||
if ((side == 0 || bIDabove != 0 || bID != Blocks.grass.blockID) && bID != Blocks.dirt.blockID)
|
||||
if ((side == 0 || babove != Blocks.air || b != Blocks.grass) && b != Blocks.dirt)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -514,7 +514,7 @@ public class AbilityHelper
|
||||
}
|
||||
else
|
||||
{
|
||||
world.setBlock(x, y, z, block.blockID);
|
||||
world.setBlock(x, y, z, block);
|
||||
onBlockChanged(stack, world, 0, x, y, z, player, random);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import tconstruct.library.TConstructRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
@@ -27,10 +28,10 @@ public abstract class HarvestTool extends ToolCore
|
||||
|
||||
NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool");
|
||||
World world = player.worldObj;
|
||||
int bID = player.worldObj.getBlockId(x, y, z);
|
||||
Block block = player.worldObj.func_147439_a(x, y, z);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
Block block = Block.blocksList[bID];
|
||||
if (block == null || bID < 1)
|
||||
//Block block = Block.blocksList[bID];
|
||||
if (block == null || block == Blocks.air)
|
||||
return false;
|
||||
int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType());
|
||||
|
||||
@@ -48,9 +49,9 @@ public abstract class HarvestTool extends ToolCore
|
||||
{
|
||||
world.setBlockToAir(x, y, z);
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
onBlockDestroyed(stack, world, bID, x, y, z, player);
|
||||
onBlockDestroyed(stack, world, block, x, y, z, player);
|
||||
if (!world.isRemote)
|
||||
world.playAuxSFX(2001, x, y, z, bID + (meta << 12));
|
||||
world.playAuxSFX(2001, x, y, z, block.getBlockID() + (meta << 12));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user