port in everything from 1.6 but labotimizetools(will do that later this weekend)

This commit is contained in:
Progwml6 committed 2014-03-15 07:11:06 -04:00
1 parent aa8d70d4c4
commit 66a4ece284
21 files changed
+8806 -131

No files matched your search

@@ -51,11 +51,13 @@ public class TActiveOmniMod extends ActiveToolMod
@Override
public boolean beforeBlockBreak (ToolCore tool, ItemStack stack, int x, int y, int z, EntityLivingBase entity)
{
NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool");
baconator(tool, stack, entity, tags);
if (entity instanceof EntityPlayer && ((EntityPlayer) entity).capabilities.isCreativeMode)
return false;
TRepo.modLapis.midStreamModify(stack, tool);
NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool");
World world = entity.worldObj;
Block block = entity.worldObj.getBlock(x, y, z);
int meta = world.getBlockMetadata(x, y, z);
@@ -150,9 +152,27 @@ public class TActiveOmniMod extends ActiveToolMod
public int baseAttackDamage (int earlyModDamage, int damage, ToolCore tool, NBTTagCompound tags, NBTTagCompound toolTags, ItemStack stack, EntityLivingBase player, Entity entity)
{
TRepo.modLapis.midStreamModify(stack, tool);
baconator(tool, stack, player, tags);
return 0;
}
private void baconator (ToolCore tool, ItemStack stack, EntityLivingBase entity, NBTTagCompound tags)
{
int bacon = 0;
bacon += tags.getInteger("Head") == 18 ? 1 : 0;
bacon += tags.getInteger("Handle") == 18 ? 1 : 0;
bacon += tags.getInteger("Accessory") == 18 ? 1 : 0;
bacon += tags.getInteger("Extra") == 18 ? 1 : 0;
int chance = tool.getPartAmount() * 100;
if (random.nextInt(chance) < bacon)
{
if (entity instanceof EntityPlayer)
AbilityHelper.spawnItemAtPlayer((EntityPlayer) entity, new ItemStack(TRepo.strangeFood, 1, 2));
else
AbilityHelper.spawnItemAtEntity(entity, new ItemStack(TRepo.strangeFood, 1, 2), 0);
}
}
@Override
public int attackDamage (int modDamage, int currentDamage, ToolCore tool, NBTTagCompound tags, NBTTagCompound toolTags, ItemStack stack, EntityLivingBase player, Entity entity)
{