bunch more random stuff fixed

This commit is contained in:
Progwml6 committed 2014-01-07 15:07:07 -05:00
1 parent f52b2f6f08
commit 9814eadaea
24 files changed
+132 -138

No files matched your search

@@ -43,7 +43,7 @@ public class AbilityHelper
public static boolean necroticUHS;
/* Normal interactions */
public static boolean onBlockChanged (ItemStack stack, World world, int bID, int x, int y, int z, EntityLivingBase player, Random random)
public static boolean onBlockChanged (ItemStack stack, World world, Block block, int x, int y, int z, EntityLivingBase player, Random random)
{
if (!stack.hasTagCompound())
return false;
@@ -260,7 +260,7 @@ public class AbilityHelper
}
else
{
Item.itemsList[stack.itemID].hitEntity(stack, (EntityLivingBase) entity, player);
stack.getItem().hitEntity(stack, (EntityLivingBase) entity, player);
}
if ((fireAspect > 0 || toolTags.hasKey("Fiery") || toolTags.hasKey("Lava")) && causedDamage)
@@ -300,7 +300,7 @@ public class AbilityHelper
{
EntityWolf var3 = (EntityWolf) living;
if (var3.isTamed() && player.username.equals(var3.getOwnerName()))
if (var3.isTamed() && player.getDisplayName().equals(var3.getOwnerName()))
{
return;
}
@@ -316,7 +316,7 @@ public class AbilityHelper
{
EntityWolf var5 = (EntityWolf) var4.next();
if (var5.isTamed() && var5.getEntityToAttack() == null && player.username.equals(var5.getOwnerName()) && (!par2 || !var5.isSitting()))
if (var5.isTamed() && var5.getEntityToAttack() == null && player.getDisplayName().equals(var5.getOwnerName()) && (!par2 || !var5.isSitting()))
{
var5.setSitting(false);
var5.setTarget(living);
@@ -495,8 +495,8 @@ public class AbilityHelper
return true;
}
Block b = world.getBlockId(x, y, z);
Block babove = world.getBlockId(x, y + 1, z);
Block b = world.func_147439_a(x, y, z);
Block babove = world.func_147439_a(x, y + 1, z);
if ((side == 0 || babove != Blocks.air || b != Blocks.grass) && b != Blocks.dirt)
{
@@ -65,7 +65,7 @@ public abstract class DualHarvestTool 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 speed = tags.getInteger("MiningSpeed");
speed /= 100f;
@@ -83,7 +83,7 @@ public abstract class DualHarvestTool extends HarvestTool
materials = getEffectiveSecondaryMaterials();
for (int i = 0; i < materials.length; i++)
{
if (materials[i] == block.blockMaterial)
if (materials[i] == block.func_149688_o())
{
float speed = tags.getInteger("MiningSpeed2");
speed /= 100f;
@@ -103,18 +103,18 @@ public abstract class DualHarvestTool extends HarvestTool
public boolean canHarvestBlock (Block block)
{
if (block.blockMaterial.isToolNotRequired())
if (block.func_149688_o().isToolNotRequired())
{
return true;
}
for (Material m : getEffectiveMaterials())
{
if (m == block.blockMaterial)
if (m == block.func_149688_o())
return true;
}
for (Material m : getEffectiveSecondaryMaterials())
{
if (m == block.blockMaterial)
if (m == block.func_149688_o())
return true;
}
return false;
@@ -69,7 +69,7 @@ public abstract class HarvestTool extends ToolCore
Material[] materials = getEffectiveMaterials();
for (int i = 0; i < materials.length; i++)
{
if (materials[i] == block.blockMaterial)
if (materials[i] == block.func_149688_o())
{
return calculateStrength(tags, block, meta);
}
@@ -117,13 +117,13 @@ public abstract class HarvestTool extends ToolCore
public boolean canHarvestBlock (Block block)
{
if (block.blockMaterial.isToolNotRequired())
if (block.func_149688_o().isToolNotRequired())
{
return true;
}
for (Material m : getEffectiveMaterials())
{
if (m == block.blockMaterial)
if (m == block.func_149688_o())
return true;
}
return false;
@@ -611,12 +611,11 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IBa
}
@Override
public boolean onBlockDestroyed (ItemStack itemstack, World world, int blockID, 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)
{
Block block = Block.blocksList[blockID];
if (block != null && (double) block.getBlockHardness(world, x, y, z) != 0.0D)
{
return AbilityHelper.onBlockChanged(itemstack, world, blockID, x, y, z, player, random);
return AbilityHelper.onBlockChanged(itemstack, world, block, x, y, z, player, random);
}
return true;
}
@@ -37,7 +37,7 @@ public abstract class Weapon extends ToolCore
for (int i = 0; i < web.length; i++)
{
if (web[i] == block.blockMaterial)
if (web[i] == block.func_149688_o())
{
return effectiveSpeed();
}
@@ -82,7 +82,7 @@ public abstract class Weapon extends ToolCore
{
for (int i = 0; i < web.length; i++)
{
if (block.blockMaterial == web[i])
if (block.func_149688_o() == web[i])
return true;
}
return super.canHarvestBlock(block);