run through remap script

This commit is contained in:
Progwml6 committed 2014-02-05 08:28:53 -05:00
1 parent 689aeba09b
commit b8cf7cdc5e
208 files changed
+4117 -4117

No files matched your search

@@ -45,15 +45,15 @@ public class Battleaxe extends HarvestTool
}
@Override
public boolean func_150894_a (ItemStack itemstack, World world, Block b, int x, int y, int z, EntityLivingBase player)
public boolean onBlockDestroyed (ItemStack itemstack, World world, Block b, int x, int y, int z, EntityLivingBase player)
{
if (b != null && b.func_149688_o() == Material.field_151584_j)
if (b != null && b.getMaterial() == Material.leaves)
return false;
return AbilityHelper.onBlockChanged(itemstack, world, b, x, y, z, player, random);
}
static Material[] materials = { Material.field_151575_d, Material.field_151582_l, Material.field_151594_q, Material.field_151570_A, Material.field_151572_C };
static Material[] materials = { Material.wood, Material.vine, Material.circuits, Material.cactus, Material.gourd };
@Override
public Item getHeadItem ()
@@ -247,15 +247,15 @@ public class Battleaxe extends HarvestTool
return false;
World world = player.worldObj;
final Block wood = world.func_147439_a(x,y,z);
final Block wood = world.getBlock(x,y,z);
NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool");
final int meta = world.getBlockMetadata(x, y, z);
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.func_149688_o() == Material.field_151575_d)
Block block = world.getBlock(x, yPos, z);
if (!(tags.getBoolean("Broken")) && block != null && block.getMaterial() == Material.wood)
{
Block localblock = world.func_147439_a(x, yPos, z);
Block localblock = world.getBlock(x, yPos, z);
int localMeta = world.getBlockMetadata(x, yPos, z);
int hlvl = block.getHarvestLevel(meta);
@@ -270,18 +270,18 @@ public class Battleaxe extends HarvestTool
if (!cancelHarvest)
{
if (block != null && block.func_149688_o() == Material.field_151575_d)
if (block != null && block.getMaterial() == Material.wood)
{
localMeta = world.getBlockMetadata(x, yPos, z);
if (!player.capabilities.isCreativeMode)
{
if (block.removedByPlayer(world, player, x, yPos, z))
{
block.func_149664_b(world, x, yPos, z, localMeta);
block.onBlockDestroyedByPlayer(world, x, yPos, z, localMeta);
}
block.func_149636_a(world, player, x, yPos, z, localMeta);
block.func_149681_a(world, x, yPos, z, localMeta, player);
func_150894_a(stack, world, block, x, yPos, z, player);
block.harvestBlock(world, player, x, yPos, z, localMeta);
block.onBlockHarvested(world, x, yPos, z, localMeta, player);
onBlockDestroyed(stack, world, block, x, yPos, z, player);
}
else
{
@@ -295,7 +295,7 @@ public class Battleaxe extends HarvestTool
break;
}
if (!world.isRemote)
world.playAuxSFX(2001, x, y, z, Block.func_149682_b(wood) + (meta << 12));
world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(wood) + (meta << 12));
return super.onBlockStartBreak(stack, x, y, z, player);
}
@@ -149,11 +149,11 @@ public abstract class BowBase extends ToolCore
//if (tinkerArrow != null)
if (slotID != -1 && (arrowID == -1 || slotID < arrowID))
{
player.inventory.func_146026_a(TRepo.arrow);
player.inventory.consumeInventoryItem(TRepo.arrow);
}
else
{
player.inventory.func_146026_a(Items.arrow);
player.inventory.consumeInventoryItem(Items.arrow);
}
}
@@ -96,13 +96,13 @@ public class Chisel extends ToolCore
int x = movingobjectposition.blockX;
int y = movingobjectposition.blockY;
int z = movingobjectposition.blockZ;
Block block = world.func_147439_a(x, y, z);
Block block = world.getBlock(x, y, z);
int meta = world.getBlockMetadata(x, y, z);
DetailInput details = TConstruct.chiselDetailing.getDetailing(block, meta);
if (details != null)
{
world.func_147465_d(x, y, z, BlockUtils.getBlockFromItemStack(details.output), details.outputMeta, 3);
world.setBlock(x, y, z, BlockUtils.getBlockFromItemStack(details.output), details.outputMeta, 3);
if (!(entityplayer.capabilities.isCreativeMode))
{
int reinforced = 0;
@@ -116,7 +116,7 @@ public class Chisel extends ToolCore
AbilityHelper.damageTool(itemstack, 1, null, false);
}
}
world.playAuxSFX(2001, x, y, z, Block.func_149682_b(block) + (meta << 12));
world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12));
entityplayer.swingItem();
}
}
@@ -38,7 +38,7 @@ public class Excavator extends HarvestTool
return "shovel";
}
static Material[] materials = { Material.field_151577_b, Material.field_151578_c, Material.field_151595_p, Material.field_151597_y, Material.field_151596_z, Material.field_151571_B };
static Material[] materials = { Material.grass, Material.ground, Material.sand, Material.snow, Material.craftedSnow, Material.clay };
@Override
public Item getHeadItem ()
@@ -142,19 +142,19 @@ public class Excavator extends HarvestTool
World world = player.worldObj;
final int meta = world.getBlockMetadata(x, y, z);
Block block = world.func_147439_a(x, y, z);
Block block = world.getBlock(x, y, z);
if (!stack.hasTagCompound())
return false;
if (block == null)
return super.onBlockStartBreak(stack, x, y, z, player);
float blockHardness = block.func_149712_f(world, x, y, z);
float blockHardness = block.getBlockHardness(world, x, y, z);
boolean validStart = false;
for (int iter = 0; iter < materials.length; iter++)
{
if (materials[iter] == block.func_149688_o())
if (materials[iter] == block.getMaterial())
{
validStart = true;
break;
@@ -192,11 +192,11 @@ public class Excavator extends HarvestTool
{
if (!(tags.getBoolean("Broken")))
{
Block localblock = world.func_147439_a(xPos, yPos, zPos);
Block localblock = world.getBlock(xPos, yPos, zPos);
block = localblock;
int localMeta = world.getBlockMetadata(xPos, yPos, zPos);
int hlvl = block.getHarvestLevel(meta);
float localHardness = block == null ? Float.MAX_VALUE : block.func_149712_f(world, xPos, yPos, zPos);
float localHardness = block == null ? Float.MAX_VALUE : block.getBlockHardness(world, xPos, yPos, zPos);
if (hlvl <= tags.getInteger("HarvestLevel") && localHardness - 1.5 <= blockHardness)
{
@@ -213,18 +213,18 @@ public class Excavator extends HarvestTool
{
for (int iter = 0; iter < materials.length; iter++)
{
if (materials[iter] == block.func_149688_o())
if (materials[iter] == block.getMaterial())
{
if (!player.capabilities.isCreativeMode)
{
if (block.removedByPlayer(world, player, xPos, yPos, zPos))
{
block.func_149664_b(world, xPos, yPos, zPos, localMeta);
block.onBlockDestroyedByPlayer(world, xPos, yPos, zPos, localMeta);
}
block.func_149636_a(world, player, xPos, yPos, zPos, localMeta);
block.func_149681_a(world, xPos, yPos, zPos, localMeta, player);
block.harvestBlock(world, player, xPos, yPos, zPos, localMeta);
block.onBlockHarvested(world, xPos, yPos, zPos, localMeta, player);
if (blockHardness > 0f)
func_150894_a(stack, world, localblock, xPos, yPos, zPos, player);
onBlockDestroyed(stack, world, localblock, xPos, yPos, zPos, player);
}
else
{
@@ -240,7 +240,7 @@ public class Excavator extends HarvestTool
}
}
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;
}
@@ -257,7 +257,7 @@ public class Excavator 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 mineSpeed = tags.getInteger("MiningSpeed");
int heads = 1;
@@ -86,7 +86,7 @@ public class FryingPan extends Weapon
{
return false;
}
else if (!world.func_147439_a(x, y, z).func_149688_o().isSolid())
else if (!world.getBlock(x, y, z).getMaterial().isSolid())
{
return false;
}
@@ -121,17 +121,17 @@ public class FryingPan extends Weapon
{
return false;
}
else if (!TRepo.heldItemBlock.func_149742_c(world, x, y, z))
else if (!TRepo.heldItemBlock.canPlaceBlockAt(world, x, y, z))
{
return false;
}
else
{
world.func_147465_d(x, y, z, TRepo.heldItemBlock, 0, 3);
TRepo.heldItemBlock.func_149689_a(world, x, y, z, player, stack);
world.setBlock(x, y, z, TRepo.heldItemBlock, 0, 3);
TRepo.heldItemBlock.onBlockPlacedBy(world, x, y, z, player, stack);
world.playSoundEffect(x, y, z, "tinker:frypan_hit", 1.0F, (random.nextFloat() - random.nextFloat()) * 0.2F + 0.65F);
EquipLogic logic = (EquipLogic) world.func_147438_o(x, y, z);
EquipLogic logic = (EquipLogic) world.getTileEntity(x, y, z);
logic.setEquipmentItem(stack);
--stack.stackSize;
@@ -68,7 +68,7 @@ public class Hammer extends HarvestTool
return materials;
}
static Material[] materials = new Material[] { Material.field_151576_e, Material.field_151573_f, Material.field_151588_w, Material.field_151592_s, Material.piston, Material. field_151574_g };
static Material[] materials = new Material[] { Material.rock, Material.iron, Material.ice, Material.glass, Material.piston, Material. anvil };
@Override
public Item getHeadItem ()
@@ -234,7 +234,7 @@ public class Hammer extends HarvestTool
return false;
World world = player.worldObj;
final Block block = world.func_147439_a(x, y, z);
final Block block = world.getBlock(x, y, z);
final int meta = world.getBlockMetadata(x, y, z);
if (!stack.hasTagCompound())
return false;
@@ -242,12 +242,12 @@ public class Hammer extends HarvestTool
if (block == null)
return super.onBlockStartBreak(stack, x, y, z, player);
float blockHardness = block.func_149712_f(world, x, y, z);
float blockHardness = block.getBlockHardness(world, x, y, z);
boolean validStart = false;
for (int iter = 0; iter < materials.length; iter++)
{
if (materials[iter] == block.func_149688_o())
if (materials[iter] == block.getMaterial())
{
validStart = true;
break;
@@ -290,10 +290,10 @@ public class Hammer extends HarvestTool
{
if (!(tags.getBoolean("Broken")))
{
Block localBlock = world.func_147439_a(xPos, yPos, zPos);
Block localBlock = world.getBlock(xPos, yPos, zPos);
int localMeta = world.getBlockMetadata(xPos, yPos, zPos);
int hlvl = block.getHarvestLevel(meta);
float localHardness = localBlock == null ? Float.MAX_VALUE : localBlock.func_149712_f(world, xPos, yPos, zPos);
float localHardness = localBlock == null ? Float.MAX_VALUE : localBlock.getBlockHardness(world, xPos, yPos, zPos);
if (hlvl <= toolLevel && localHardness - 1.5 <= blockHardness)
{
@@ -310,18 +310,18 @@ public class Hammer extends HarvestTool
{
for (int iter = 0; iter < materials.length; iter++)
{
if (materials[iter] == localBlock.func_149688_o() || localBlock == Blocks.monster_egg)
if (materials[iter] == localBlock.getMaterial() || localBlock == Blocks.monster_egg)
{
if (!player.capabilities.isCreativeMode)
{
if (localBlock.removedByPlayer(world, player, xPos, yPos, zPos))
{
localBlock.func_149664_b(world, xPos, yPos, zPos, localMeta);
localBlock.onBlockDestroyedByPlayer(world, xPos, yPos, zPos, localMeta);
}
localBlock.func_149636_a(world, player, xPos, yPos, zPos, localMeta);
localBlock.func_149681_a(world, xPos, yPos, zPos, localMeta, player);
localBlock.harvestBlock(world, player, xPos, yPos, zPos, localMeta);
localBlock.onBlockHarvested(world, xPos, yPos, zPos, localMeta, player);
if (blockHardness > 0f)
func_150894_a(stack, world, localBlock, xPos, yPos, zPos, player);
onBlockDestroyed(stack, world, localBlock, xPos, yPos, zPos, player);
}
else
{
@@ -337,7 +337,7 @@ public class Hammer extends HarvestTool
}
}
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;
}
@@ -354,7 +354,7 @@ public class Hammer 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())
{
return getblockSpeed(tags, block, meta);
}
@@ -34,15 +34,15 @@ public class Hatchet extends HarvestTool
}
@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 && block.func_149688_o() == Material.field_151584_j)
if (block != null && block.getMaterial() == Material.leaves)
return false;
return AbilityHelper.onBlockChanged(itemstack, world, block, x, y, z, player, random);
}
static Material[] materials = { Material.field_151575_d, Material.field_151584_j, Material.field_151582_l, Material.field_151594_q, Material.field_151570_A};//TODO find this//, Material.pumpkin };
static Material[] materials = { Material.wood, Material.leaves, Material.vine, Material.circuits, Material.cactus};//TODO find this//, Material.pumpkin };
@Override
public Item getHeadItem ()
@@ -55,15 +55,15 @@ public class LumberAxe extends HarvestTool
}
@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 && block.func_149688_o() == Material.field_151584_j)
if (block != null && block.getMaterial() == Material.leaves)
return false;
return AbilityHelper.onBlockChanged(itemstack, world, block, x, y, z, player, random);
}
static Material[] materials = { Material.field_151575_d, Material.field_151582_l, Material.field_151594_q, Material.field_151570_A};//TODO find this//, Material.pumpkin };
static Material[] materials = { Material.wood, Material.vine, Material.circuits, Material.cactus};//TODO find this//, Material.pumpkin };
/* Lumber axe specific */
@@ -95,7 +95,7 @@ public class LumberAxe 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 mineSpeed = tags.getInteger("MiningSpeed");
int heads = 1;
@@ -139,19 +139,19 @@ public class LumberAxe extends HarvestTool
return false;
World world = player.worldObj;
final Block wood = world.func_147439_a(x, y, z);;
final Block wood = world.getBlock(x, y, z);;
if (wood == null)
{
return super.onBlockStartBreak(stack, x, y, z, player);
}
if (wood.isWood(world, x, y, z) || wood.func_149688_o() == Material.field_151583_m)
if (wood.isWood(world, x, y, z) || wood.getMaterial() == Material.sponge)
{
int height = y;
boolean foundTop = false;
do
{
height++;
Block block = world.func_147439_a(x, height, z);
Block block = world.getBlock(x, height, z);
if (block != wood)
{
height--;
@@ -168,7 +168,7 @@ public class LumberAxe extends HarvestTool
{
for (int zPos = z - 1; zPos <= z + 1; zPos++)
{
Block leaves = world.func_147439_a(xPos, yPos, zPos);
Block leaves = world.getBlock(xPos, yPos, zPos);
if (leaves != null && leaves.isLeaves(world, xPos, yPos, zPos))
numLeaves++;
}
@@ -184,15 +184,15 @@ public class LumberAxe extends HarvestTool
destroyWood(world, x, y, z, stack, tags, player);
if (!world.isRemote)
world.playAuxSFX(2001, x, y, z, Block.func_149682_b(wood) + (meta << 12));
world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(wood) + (meta << 12));
}
else if (wood.func_149688_o() == Material.field_151575_d)
else if (wood.getMaterial() == Material.wood)
{
NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool");
int meta = world.getBlockMetadata(x, y, z);
destroyWood(world, x, y, z, stack, tags, player);
if (!world.isRemote)
world.playAuxSFX(2001, x, y, z, Block.func_149682_b(wood) + (meta << 12));
world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(wood) + (meta << 12));
}
return super.onBlockStartBreak(stack, x, y, z, player);
}
@@ -208,7 +208,7 @@ public class LumberAxe extends HarvestTool
{
if (!(tags.getBoolean("Broken")))
{
Block localblock = world.func_147439_a(xPos, yPos, zPos);
Block localblock = world.getBlock(xPos, yPos, zPos);
if (bID == localblock)
{
block = localblock;
@@ -242,11 +242,11 @@ public class LumberAxe extends HarvestTool
{
if (block.removedByPlayer(world, player, xPos, yPos, zPos))
{
block.func_149664_b(world, xPos, yPos, zPos, meta);
block.onBlockDestroyedByPlayer(world, xPos, yPos, zPos, meta);
}
block.func_149636_a(world, player, xPos, yPos, zPos, meta);
block.func_149681_a(world, xPos, yPos, zPos, meta, player);
func_150894_a(stack, world, localblock, xPos, yPos, zPos, player);
block.harvestBlock(world, player, xPos, yPos, zPos, meta);
block.onBlockHarvested(world, xPos, yPos, zPos, meta, player);
onBlockDestroyed(stack, world, localblock, xPos, yPos, zPos, player);
}
else
{
@@ -286,11 +286,11 @@ public class LumberAxe extends HarvestTool
{
if (!(tags.getBoolean("Broken")))
{
Block block = world.func_147439_a(xPos, yPos, zPos);
Block block = world.getBlock(xPos, yPos, zPos);
int meta = world.getBlockMetadata(xPos, yPos, zPos);
int hlvl = block.getHarvestLevel(meta);
if (block != null && block.func_149688_o() == Material.field_151575_d)
if (block != null && block.getMaterial() == Material.wood)
{
if (hlvl <= tags.getInteger("HarvestLevel"))
{
@@ -307,8 +307,8 @@ public class LumberAxe extends HarvestTool
if (!player.capabilities.isCreativeMode)
{
//TODO harvestBlock
block.func_149636_a(world, player, xPos, yPos, zPos, meta);
func_150894_a(stack, world, block, xPos, yPos, zPos, player);
block.harvestBlock(world, player, xPos, yPos, zPos, meta);
onBlockDestroyed(stack, world, block, xPos, yPos, zPos, player);
}
}
}
@@ -47,8 +47,8 @@ public class Mattock extends DualHarvestTool
return "shovel";
}
static Material[] axeMaterials = { Material.field_151575_d, Material.field_151570_A};//TODO find this//, Material.pumpkin, Material.field_151585_k, Material.field_151582_l };
static Material[] shovelMaterials = { Material.field_151577_b, Material.field_151578_c, Material.field_151571_B };
static Material[] axeMaterials = { Material.wood, Material.cactus};//TODO find this//, Material.pumpkin, Material.plants, Material.vine };
static Material[] shovelMaterials = { Material.grass, Material.ground, Material.clay };
@Override
public Item getHeadItem ()
@@ -25,7 +25,7 @@ public class Pickaxe extends HarvestTool
return materials;
}
static Material[] materials = new Material[] { Material.field_151576_e, Material.field_151573_f, Material.field_151588_w, Material.field_151592_s, Material.piston, Material.field_151574_g, Material.field_151594_q };
static Material[] materials = new Material[] { Material.rock, Material.iron, Material.ice, Material.glass, Material.piston, Material.anvil, Material.circuits };
@Override
public Item getHeadItem ()
@@ -111,7 +111,7 @@ public class PotionLauncher extends Item
}
@Override
public void func_150895_a (Item b, CreativeTabs tabs, List list)
public void getSubItems (Item b, CreativeTabs tabs, List list)
{
ItemStack stack = new ItemStack(b, 1, 0);
NBTTagCompound compound = new NBTTagCompound();
@@ -40,7 +40,7 @@ public class Scythe extends Weapon
return materials;
}
static Material[] materials = new Material[] { Material.field_151569_G, Material.field_151570_A};//TODO find this//, Material.pumpkin, Material.field_151585_k, Material.field_151582_l, Material.field_151584_j };
static Material[] materials = new Material[] { Material.web, Material.cactus};//TODO find this//, Material.pumpkin, Material.plants, Material.vine, Material.leaves };
@Override
public Item getHeadItem ()
@@ -155,7 +155,7 @@ public class Scythe extends Weapon
return false;
World world = player.worldObj;
final Block blockB = world.func_147439_a(x, y, z);
final Block blockB = world.getBlock(x, y, z);
final int meta = world.getBlockMetadata(x, y, z);
if (!stack.hasTagCompound())
return false;
@@ -177,21 +177,21 @@ public class Scythe extends Weapon
if (!cancelHarvest)
{
Block block = world.func_147439_a(xPos, yPos, zPos);
if (block != null)// && (block.func_149688_o() == Material.field_151584_j || block.isLeaves(world, xPos, yPos, zPos)))
Block block = world.getBlock(xPos, yPos, zPos);
if (block != null)// && (block.getMaterial() == Material.leaves || block.isLeaves(world, xPos, yPos, zPos)))
{
for (int iter = 0; iter < materials.length; iter++)
{
if (materials[iter] == block.func_149688_o())
if (materials[iter] == block.getMaterial())
{
int localMeta = world.getBlockMetadata(xPos, yPos, zPos);
WorldHelper.setBlockToAir(world, xPos, yPos, zPos);
if (!player.capabilities.isCreativeMode)
{
block.func_149664_b(world, x, y, z, meta);
block.func_149636_a(world, player, xPos, yPos, zPos, localMeta);
block.func_149681_a(world, x, y, z, localMeta, player);
func_150894_a(stack, world, blockB, xPos, yPos, zPos, player);
block.onBlockDestroyedByPlayer(world, x, y, z, meta);
block.harvestBlock(world, player, xPos, yPos, zPos, localMeta);
block.onBlockHarvested(world, x, y, z, localMeta, player);
onBlockDestroyed(stack, world, blockB, xPos, yPos, zPos, player);
}
}
}
@@ -202,7 +202,7 @@ public class Scythe extends Weapon
}
}
if (!world.isRemote)
world.playAuxSFX(2001, x, y, z, Block.func_149682_b(blockB) + (meta << 12));
world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(blockB) + (meta << 12));
return super.onBlockStartBreak(stack, x, y, z, player);
}
@@ -27,7 +27,7 @@ public class Shovel extends HarvestTool
return "shovel";
}
static Material[] materials = { Material.field_151577_b, Material.field_151578_c, Material.field_151595_p, Material.field_151597_y, Material.field_151596_z, Material.field_151571_B };
static Material[] materials = { Material.grass, Material.ground, Material.sand, Material.snow, Material.craftedSnow, Material.clay };
@Override
public Item getHeadItem ()