mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-22 05:02:39 +00:00
bunch more random stuff fixed
This commit is contained in:
1 parent
f52b2f6f08
commit
9814eadaea
24 files changed
+132
-138
No files matched your search
@@ -46,7 +46,7 @@ public class Battleaxe extends HarvestTool
|
||||
@Override
|
||||
public boolean onBlockDestroyed (ItemStack itemstack, World world, Block b, int x, int y, int z, EntityLivingBase player)
|
||||
{
|
||||
if (b != null && b.blockMaterial == Material.leaves)
|
||||
if (b != null && b.func_149688_o() == Material.leaves)
|
||||
return false;
|
||||
|
||||
return AbilityHelper.onBlockChanged(itemstack, world, b, x, y, z, player, random);
|
||||
@@ -252,7 +252,7 @@ public class Battleaxe extends HarvestTool
|
||||
for (int yPos = y + 1; yPos < y + 9; yPos++)
|
||||
{
|
||||
Block block = world.func_147439_a(x, yPos, z);
|
||||
if (!(tags.getBoolean("Broken")) && block != null && block.blockMaterial == Material.wood)
|
||||
if (!(tags.getBoolean("Broken")) && block != null && block.func_149688_o() == Material.wood)
|
||||
{
|
||||
Block localblock = world.func_147439_a(x, yPos, z);
|
||||
int localMeta = world.getBlockMetadata(x, yPos, z);
|
||||
@@ -269,7 +269,7 @@ public class Battleaxe extends HarvestTool
|
||||
|
||||
if (!cancelHarvest)
|
||||
{
|
||||
if (block != null && block.blockMaterial == Material.wood)
|
||||
if (block != null && block.func_149688_o() == Material.wood)
|
||||
{
|
||||
localMeta = world.getBlockMetadata(x, yPos, z);
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
|
||||
@@ -154,7 +154,7 @@ public class Excavator extends HarvestTool
|
||||
boolean validStart = false;
|
||||
for (int iter = 0; iter < materials.length; iter++)
|
||||
{
|
||||
if (materials[iter] == block.blockMaterial)
|
||||
if (materials[iter] == block.func_149688_o())
|
||||
{
|
||||
validStart = true;
|
||||
break;
|
||||
@@ -213,7 +213,7 @@ public class Excavator extends HarvestTool
|
||||
{
|
||||
for (int iter = 0; iter < materials.length; iter++)
|
||||
{
|
||||
if (materials[iter] == block.blockMaterial)
|
||||
if (materials[iter] == block.func_149688_o())
|
||||
{
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
{
|
||||
@@ -257,7 +257,7 @@ public class Excavator extends HarvestTool
|
||||
Material[] materials = getEffectiveMaterials();
|
||||
for (int i = 0; i < materials.length; i++)
|
||||
{
|
||||
if (materials[i] == block.blockMaterial)
|
||||
if (materials[i] == block.func_149688_o())
|
||||
{
|
||||
float mineSpeed = tags.getInteger("MiningSpeed");
|
||||
int heads = 1;
|
||||
|
||||
@@ -233,9 +233,8 @@ public class Hammer extends HarvestTool
|
||||
return false;
|
||||
|
||||
World world = player.worldObj;
|
||||
final int blockID = world.getBlockId(x, y, z);
|
||||
final Block block = world.func_147439_a(x, y, z);
|
||||
final int meta = world.getBlockMetadata(x, y, z);
|
||||
final Block block = Block.blocksList[blockID];
|
||||
if (!stack.hasTagCompound())
|
||||
return false;
|
||||
|
||||
@@ -247,7 +246,7 @@ public class Hammer extends HarvestTool
|
||||
boolean validStart = false;
|
||||
for (int iter = 0; iter < materials.length; iter++)
|
||||
{
|
||||
if (materials[iter] == block.blockMaterial)
|
||||
if (materials[iter] == block.func_149688_o())
|
||||
{
|
||||
validStart = true;
|
||||
break;
|
||||
@@ -311,7 +310,7 @@ public class Hammer extends HarvestTool
|
||||
{
|
||||
for (int iter = 0; iter < materials.length; iter++)
|
||||
{
|
||||
if (materials[iter] == localBlock.blockMaterial || localBlock == Block.silverfish)
|
||||
if (materials[iter] == localBlock.func_149688_o() || localBlock == Block.silverfish)
|
||||
{
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
{
|
||||
@@ -355,7 +354,7 @@ public class Hammer extends HarvestTool
|
||||
Material[] materials = getEffectiveMaterials();
|
||||
for (int i = 0; i < materials.length; i++)
|
||||
{
|
||||
if (materials[i] == block.blockMaterial)
|
||||
if (materials[i] == block.func_149688_o())
|
||||
{
|
||||
return getblockSpeed(tags, block, meta);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public class Hatchet extends HarvestTool
|
||||
public boolean onBlockDestroyed (ItemStack itemstack, World world, int bID, int x, int y, int z, EntityLivingBase player)
|
||||
{
|
||||
Block block = Block.blocksList[bID];
|
||||
if (block != null && block.blockMaterial == Material.leaves)
|
||||
if (block != null && block.func_149688_o() == Material.leaves)
|
||||
return false;
|
||||
|
||||
return AbilityHelper.onBlockChanged(itemstack, world, bID, x, y, z, player, random);
|
||||
|
||||
@@ -57,7 +57,7 @@ public class LumberAxe extends HarvestTool
|
||||
public boolean onBlockDestroyed (ItemStack itemstack, World world, int bID, int x, int y, int z, EntityLivingBase player)
|
||||
{
|
||||
Block block = Block.blocksList[bID];
|
||||
if (block != null && block.blockMaterial == Material.leaves)
|
||||
if (block != null && block.func_149688_o() == Material.leaves)
|
||||
return false;
|
||||
|
||||
return AbilityHelper.onBlockChanged(itemstack, world, bID, x, y, z, player, random);
|
||||
@@ -95,7 +95,7 @@ public class LumberAxe extends HarvestTool
|
||||
Material[] materials = getEffectiveMaterials();
|
||||
for (int i = 0; i < materials.length; i++)
|
||||
{
|
||||
if (materials[i] == block.blockMaterial)
|
||||
if (materials[i] == block.func_149688_o())
|
||||
{
|
||||
float mineSpeed = tags.getInteger("MiningSpeed");
|
||||
int heads = 1;
|
||||
@@ -145,7 +145,7 @@ public class LumberAxe extends HarvestTool
|
||||
{
|
||||
return super.onBlockStartBreak(stack, x, y, z, player);
|
||||
}
|
||||
if (wood.isWood(world, x, y, z) || wood.blockMaterial == Material.sponge)
|
||||
if (wood.isWood(world, x, y, z) || wood.func_149688_o() == Material.sponge)
|
||||
{
|
||||
int height = y;
|
||||
boolean foundTop = false;
|
||||
@@ -187,7 +187,7 @@ public class LumberAxe extends HarvestTool
|
||||
if (!world.isRemote)
|
||||
world.playAuxSFX(2001, x, y, z, woodID + (meta << 12));
|
||||
}
|
||||
else if (wood.blockMaterial == Material.wood)
|
||||
else if (wood.func_149688_o() == Material.wood)
|
||||
{
|
||||
NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool");
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
@@ -292,7 +292,7 @@ public class LumberAxe extends HarvestTool
|
||||
int meta = world.getBlockMetadata(xPos, yPos, zPos);
|
||||
int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType());
|
||||
|
||||
if (block != null && block.blockMaterial == Material.wood)
|
||||
if (block != null && block.func_149688_o() == Material.wood)
|
||||
{
|
||||
if (hlvl <= tags.getInteger("HarvestLevel"))
|
||||
{
|
||||
|
||||
@@ -179,11 +179,11 @@ public class Scythe extends Weapon
|
||||
{
|
||||
int localblockID = world.getBlockId(xPos, yPos, zPos);
|
||||
Block block = Block.blocksList[localblockID];
|
||||
if (block != null)// && (block.blockMaterial == Material.leaves || block.isLeaves(world, xPos, yPos, zPos)))
|
||||
if (block != null)// && (block.func_149688_o() == Material.leaves || block.isLeaves(world, xPos, yPos, zPos)))
|
||||
{
|
||||
for (int iter = 0; iter < materials.length; iter++)
|
||||
{
|
||||
if (materials[iter] == block.blockMaterial)
|
||||
if (materials[iter] == block.func_149688_o())
|
||||
{
|
||||
int localMeta = world.getBlockMetadata(xPos, yPos, zPos);
|
||||
world.setBlockToAir(xPos, yPos, zPos);
|
||||
|
||||
Reference in new issue
Block a user