mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-20 04:09:40 +00:00
some moar fixes
This commit is contained in:
1 parent
ee7bc7d7eb
commit
8ae89ba70e
7 files changed
+16
-16
No files matched your search
@@ -100,7 +100,7 @@ public class Landmine extends MantleBlock
|
||||
*/
|
||||
public boolean canPlaceBlockAt (World par1World, int par2, int par3, int par4)
|
||||
{
|
||||
return par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) || BlockFence.isIdAFence(par1World.getBlockId(par2, par3 - 1, par4));
|
||||
return par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) || BlockFence.func_149825_a(par1World.func_147439_a(par2, par3 - 1, par4));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -111,7 +111,7 @@ public class Landmine extends MantleBlock
|
||||
{
|
||||
boolean var6 = false;
|
||||
|
||||
if (!par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && !BlockFence.isIdAFence(par1World.getBlockId(par2, par3 - 1, par4)))
|
||||
if (!par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && !BlockFence.func_149825_a(par1World.func_147439_a(par2, par3 - 1, par4)))
|
||||
{
|
||||
var6 = true;
|
||||
}
|
||||
|
||||
@@ -257,7 +257,7 @@ public class Battleaxe extends HarvestTool
|
||||
{
|
||||
Block localblock = world.func_147439_a(x, yPos, z);
|
||||
int localMeta = world.getBlockMetadata(x, yPos, z);
|
||||
int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType());
|
||||
int hlvl = block.getHarvestLevel(meta);
|
||||
|
||||
if (hlvl <= tags.getInteger("HarvestLevel"))
|
||||
{
|
||||
@@ -295,7 +295,7 @@ public class Battleaxe extends HarvestTool
|
||||
break;
|
||||
}
|
||||
if (!world.isRemote)
|
||||
world.playAuxSFX(2001, x, y, z, wood.getBlockID() + (meta << 12));
|
||||
world.playAuxSFX(2001, x, y, z, Block.func_149682_b(wood) + (meta << 12));
|
||||
return super.onBlockStartBreak(stack, x, y, z, player);
|
||||
}
|
||||
|
||||
|
||||
@@ -195,7 +195,7 @@ public class Excavator extends HarvestTool
|
||||
Block localblock = world.func_147439_a(xPos, yPos, zPos);
|
||||
block = localblock;
|
||||
int localMeta = world.getBlockMetadata(xPos, yPos, zPos);
|
||||
int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType());
|
||||
int hlvl = block.getHarvestLevel(meta);
|
||||
float localHardness = block == null ? Float.MAX_VALUE : block.func_149712_f(world, xPos, yPos, zPos);
|
||||
|
||||
if (hlvl <= tags.getInteger("HarvestLevel") && localHardness - 1.5 <= blockHardness)
|
||||
@@ -279,7 +279,7 @@ public class Excavator extends HarvestTool
|
||||
heads++;
|
||||
}
|
||||
float trueSpeed = mineSpeed / (heads * 300f);
|
||||
int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType());
|
||||
int hlvl = block.getHarvestLevel(meta);
|
||||
int durability = tags.getInteger("Damage");
|
||||
|
||||
float stonebound = tags.getFloat("Shoddy");
|
||||
|
||||
@@ -292,7 +292,7 @@ public class Hammer extends HarvestTool
|
||||
{
|
||||
Block localBlock = world.func_147439_a(xPos, yPos, zPos);
|
||||
int localMeta = world.getBlockMetadata(xPos, yPos, zPos);
|
||||
int hlvl = MinecraftForge.getBlockHarvestLevel(localBlock, meta, getHarvestType());
|
||||
int hlvl = block.getHarvestLevel(meta);
|
||||
float localHardness = localBlock == null ? Float.MAX_VALUE : localBlock.func_149712_f(world, xPos, yPos, zPos);
|
||||
|
||||
if (hlvl <= toolLevel && localHardness - 1.5 <= blockHardness)
|
||||
@@ -387,7 +387,7 @@ public class Hammer extends HarvestTool
|
||||
heads++;
|
||||
}
|
||||
float trueSpeed = mineSpeed / (heads * 300f);
|
||||
int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType());
|
||||
int hlvl = block.getHarvestLevel(meta);
|
||||
int durability = tags.getInteger("Damage");
|
||||
|
||||
float stonebound = tags.getFloat("Shoddy");
|
||||
|
||||
@@ -117,7 +117,7 @@ public class LumberAxe extends HarvestTool
|
||||
heads++;
|
||||
}
|
||||
float trueSpeed = mineSpeed / (heads * 300f);
|
||||
int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType());
|
||||
int hlvl = block.getHarvestLevel(meta);
|
||||
int durability = tags.getInteger("Damage");
|
||||
|
||||
float stonebound = tags.getFloat("Shoddy");
|
||||
@@ -213,7 +213,7 @@ public class LumberAxe extends HarvestTool
|
||||
{
|
||||
block = localblock;
|
||||
meta = world.getBlockMetadata(xPos, yPos, zPos);
|
||||
int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType());
|
||||
int hlvl = block.getHarvestLevel(meta);
|
||||
|
||||
if (hlvl <= tags.getInteger("HarvestLevel"))
|
||||
{
|
||||
@@ -288,7 +288,7 @@ public class LumberAxe extends HarvestTool
|
||||
{
|
||||
Block block = world.func_147439_a(xPos, yPos, zPos);
|
||||
int meta = world.getBlockMetadata(xPos, yPos, zPos);
|
||||
int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType());
|
||||
int hlvl = block.getHarvestLevel(meta);
|
||||
|
||||
if (block != null && block.func_149688_o() == Material.field_151575_d)
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ public abstract class DualHarvestTool extends HarvestTool
|
||||
else
|
||||
{
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
onBlockDestroyed(stack, world, block, x, y, z, player);
|
||||
func_150894_a(stack, world, block, x, y, z, player);
|
||||
WorldHelper.setBlockToAir(world, x, y, z);
|
||||
if (!world.isRemote)
|
||||
world.playAuxSFX(2001, x, y, z, Block.func_149682_b(block) + (meta << 12));
|
||||
|
||||
@@ -34,7 +34,7 @@ public abstract class HarvestTool extends ToolCore
|
||||
//Block block = Block.blocksList[bID];
|
||||
if (block == null || block == Blocks.air)
|
||||
return false;
|
||||
int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType());
|
||||
int hlvl = block.getHarvestLevel(meta);
|
||||
|
||||
if (hlvl <= tags.getInteger("HarvestLevel"))
|
||||
{
|
||||
@@ -52,7 +52,7 @@ public abstract class HarvestTool extends ToolCore
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
func_150894_a(stack, world, block, x, y, z, player);
|
||||
if (!world.isRemote)
|
||||
world.playAuxSFX(2001, x, y, z, block.getBlockID() + (meta << 12));
|
||||
world.playAuxSFX(2001, x, y, z, Block.func_149682_b(block) + (meta << 12));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -75,7 +75,7 @@ public abstract class HarvestTool extends ToolCore
|
||||
return calculateStrength(tags, block, meta);
|
||||
}
|
||||
}
|
||||
if (MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType()) > 0)
|
||||
if (block.getHarvestLevel(meta) > 0)
|
||||
{
|
||||
return calculateStrength(tags, block, meta); //No issue if the harvest level is too low
|
||||
}
|
||||
@@ -104,7 +104,7 @@ public abstract class HarvestTool extends ToolCore
|
||||
heads++;
|
||||
}
|
||||
float trueSpeed = mineSpeed / (heads * 100f);
|
||||
int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType());
|
||||
int hlvl = block.getHarvestLevel(meta);
|
||||
int durability = tags.getInteger("Damage");
|
||||
|
||||
float stonebound = tags.getFloat("Shoddy");
|
||||
|
||||
Reference in new issue
Block a user