mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-25 14:34:22 +00:00
run through remap script
This commit is contained in:
1 parent
689aeba09b
commit
b8cf7cdc5e
208 files changed
+4117
-4117
No files matched your search
@@ -496,8 +496,8 @@ public class AbilityHelper
|
||||
return true;
|
||||
}
|
||||
|
||||
Block b = world.func_147439_a(x, y, z);
|
||||
Block babove = world.func_147439_a(x, y + 1, z);
|
||||
Block b = world.getBlock(x, y, z);
|
||||
Block babove = world.getBlock(x, y + 1, z);
|
||||
|
||||
if ((side == 0 || babove != Blocks.air || b != Blocks.grass) && b != Blocks.dirt)
|
||||
{
|
||||
@@ -506,8 +506,8 @@ public class AbilityHelper
|
||||
else
|
||||
{
|
||||
Block block = Blocks.farmland;
|
||||
world.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), block.field_149762_H.field_150501_a,
|
||||
(block.field_149762_H.func_150497_c() + 1.0F) / 2.0F, block.field_149762_H.func_150494_d() * 0.8F);
|
||||
world.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), block.stepSound.soundName,
|
||||
(block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F);
|
||||
|
||||
if (world.isRemote)
|
||||
{
|
||||
@@ -515,7 +515,7 @@ public class AbilityHelper
|
||||
}
|
||||
else
|
||||
{
|
||||
world.func_147449_b(x, y, z, block);
|
||||
world.setBlock(x, y, z, block);
|
||||
onBlockChanged(stack, world, Blocks.air, x, y, z, player, random);
|
||||
return true;
|
||||
}
|
||||
@@ -605,7 +605,7 @@ public class AbilityHelper
|
||||
float f6 = random.nextFloat() * f3 + (1.0F - f3) * 0.5F;
|
||||
entityitem = new EntityItem(world, f + f4, f1 + f5, f2 + f6, itemstack);
|
||||
}
|
||||
entityitem.field_145804_b = 10;
|
||||
entityitem.delayBeforeCanPickup = 10;
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
return entityitem;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public abstract class DualHarvestTool extends HarvestTool
|
||||
NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool");
|
||||
World world = player.worldObj;
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
Block block = player.worldObj.func_147439_a(x, y, z);
|
||||
Block block = player.worldObj.getBlock(x, y, z);
|
||||
if (block == null || block == Blocks.air)
|
||||
return false;
|
||||
int hlvl = block.getHarvestLevel(meta);
|
||||
@@ -47,10 +47,10 @@ public abstract class DualHarvestTool extends HarvestTool
|
||||
else
|
||||
{
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
func_150894_a(stack, world, block, x, y, z, player);
|
||||
onBlockDestroyed(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));
|
||||
world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -66,7 +66,7 @@ public abstract class DualHarvestTool extends HarvestTool
|
||||
Material[] materials = getEffectiveMaterials();
|
||||
for (int i = 0; i < materials.length; i++)
|
||||
{
|
||||
if (materials[i] == block.func_149688_o())
|
||||
if (materials[i] == block.getMaterial())
|
||||
{
|
||||
float speed = tags.getInteger("MiningSpeed");
|
||||
speed /= 100f;
|
||||
@@ -84,7 +84,7 @@ public abstract class DualHarvestTool extends HarvestTool
|
||||
materials = getEffectiveSecondaryMaterials();
|
||||
for (int i = 0; i < materials.length; i++)
|
||||
{
|
||||
if (materials[i] == block.func_149688_o())
|
||||
if (materials[i] == block.getMaterial())
|
||||
{
|
||||
float speed = tags.getInteger("MiningSpeed2");
|
||||
speed /= 100f;
|
||||
@@ -104,18 +104,18 @@ public abstract class DualHarvestTool extends HarvestTool
|
||||
|
||||
public boolean canHarvestBlock (Block block)
|
||||
{
|
||||
if (block.func_149688_o().isToolNotRequired())
|
||||
if (block.getMaterial().isToolNotRequired())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
for (Material m : getEffectiveMaterials())
|
||||
{
|
||||
if (m == block.func_149688_o())
|
||||
if (m == block.getMaterial())
|
||||
return true;
|
||||
}
|
||||
for (Material m : getEffectiveSecondaryMaterials())
|
||||
{
|
||||
if (m == block.func_149688_o())
|
||||
if (m == block.getMaterial())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -29,7 +29,7 @@ public abstract class HarvestTool extends ToolCore
|
||||
|
||||
NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool");
|
||||
World world = player.worldObj;
|
||||
Block block = player.worldObj.func_147439_a(x, y, z);
|
||||
Block block = player.worldObj.getBlock(x, y, z);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
//Block block = Block.blocksList[bID];
|
||||
if (block == null || block == Blocks.air)
|
||||
@@ -50,9 +50,9 @@ public abstract class HarvestTool extends ToolCore
|
||||
{
|
||||
WorldHelper.setBlockToAir(world, x, y, z);
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
func_150894_a(stack, world, block, x, y, z, player);
|
||||
onBlockDestroyed(stack, world, block, x, y, z, player);
|
||||
if (!world.isRemote)
|
||||
world.playAuxSFX(2001, x, y, z, Block.func_149682_b(block) + (meta << 12));
|
||||
world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -70,7 +70,7 @@ public abstract class HarvestTool extends ToolCore
|
||||
Material[] materials = getEffectiveMaterials();
|
||||
for (int i = 0; i < materials.length; i++)
|
||||
{
|
||||
if (materials[i] == block.func_149688_o())
|
||||
if (materials[i] == block.getMaterial())
|
||||
{
|
||||
return calculateStrength(tags, block, meta);
|
||||
}
|
||||
@@ -118,13 +118,13 @@ public abstract class HarvestTool extends ToolCore
|
||||
|
||||
public boolean canHarvestBlock (Block block)
|
||||
{
|
||||
if (block.func_149688_o().isToolNotRequired())
|
||||
if (block.getMaterial().isToolNotRequired())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
for (Material m : getEffectiveMaterials())
|
||||
{
|
||||
if (m == block.func_149688_o())
|
||||
if (m == block.getMaterial())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -613,9 +613,9 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IBa
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean func_150894_a (ItemStack itemstack, World world, Block block, int x, int y, int z, EntityLivingBase player)
|
||||
public boolean onBlockDestroyed (ItemStack itemstack, World world, Block block, int x, int y, int z, EntityLivingBase player)
|
||||
{
|
||||
if (block != null && (double) block.func_149712_f(world, x, y, z) != 0.0D)
|
||||
if (block != null && (double) block.getBlockHardness(world, x, y, z) != 0.0D)
|
||||
{
|
||||
return AbilityHelper.onBlockChanged(itemstack, world, block, x, y, z, player, random);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public abstract class Weapon extends ToolCore
|
||||
|
||||
for (int i = 0; i < web.length; i++)
|
||||
{
|
||||
if (web[i] == block.func_149688_o())
|
||||
if (web[i] == block.getMaterial())
|
||||
{
|
||||
return effectiveSpeed();
|
||||
}
|
||||
@@ -82,7 +82,7 @@ public abstract class Weapon extends ToolCore
|
||||
{
|
||||
for (int i = 0; i < web.length; i++)
|
||||
{
|
||||
if (block.func_149688_o() == web[i])
|
||||
if (block.getMaterial() == web[i])
|
||||
return true;
|
||||
}
|
||||
return super.canHarvestBlock(block, is);
|
||||
@@ -123,7 +123,7 @@ public abstract class Weapon extends ToolCore
|
||||
return new String[] { "weapon", "melee" };
|
||||
}
|
||||
|
||||
public static Material[] web = new Material[] { Material.field_151569_G };
|
||||
public static Material[] web = new Material[] { Material.web };
|
||||
public static Material[] none = new Material[0];
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user