Added an AgriCraft Harvest Handler for their crops (uses reflection, so will be pulled as soon as the official one is made on their side)

Added the checks required for Strength to affect the damage of the Tool Paradigms.
This commit is contained in:
WayofTime 2015-04-21 12:33:20 -04:00
parent 201c70a766
commit 34f779563e
11 changed files with 136 additions and 34 deletions

View file

@ -11,6 +11,7 @@ import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
@ -48,12 +49,16 @@ public class ItemSpellMultiTool extends Item
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundTool");
}
@Override
public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase)
{
float damage = this.getCustomItemAttack(par1ItemStack);
float f = (float)par3EntityLivingBase.getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue();
damage *= f;
SpellParadigmTool parad = this.loadParadigmFromStack(par1ItemStack);
if (parad != null)
@ -149,7 +154,7 @@ public class ItemSpellMultiTool extends Item
{
if (isEffective)
{
if (localBlock.removedByPlayer(world, player, x, y, z))
if (localBlock.removedByPlayer(world, player, x, y, z, true))
{
localBlock.onBlockDestroyedByPlayer(world, x, y, z, localMeta);
}
@ -194,8 +199,8 @@ public class ItemSpellMultiTool extends Item
}
}
if (!world.isRemote)
world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12));
// if (!world.isRemote)
// world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12));
return true;
}