Crafting Station Start

This commit is contained in:
mDiyo committed 2013-08-31 00:12:56 -07:00
1 parent 99d7ccbd4d
commit 4ec9261b41
29 files changed
+371 -249

No files matched your search

+11 -8
View File
@@ -7,11 +7,6 @@ import java.util.Iterator;
import java.util.List;
import java.util.Random;
import tconstruct.library.ActiveToolMod;
import tconstruct.library.TConstructRegistry;
import tconstruct.library.util.PiercingEntityDamage;
import net.minecraft.block.Block;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.enchantment.EnchantmentThorns;
@@ -20,6 +15,7 @@ import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.monster.EntityGhast;
import net.minecraft.entity.monster.IMob;
import net.minecraft.entity.passive.EntityWolf;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
@@ -39,6 +35,10 @@ import net.minecraftforge.common.FakePlayer;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.Event.Result;
import net.minecraftforge.event.entity.player.UseHoeEvent;
import tconstruct.library.ActiveToolMod;
import tconstruct.library.TConstructRegistry;
import tconstruct.library.util.PiercingEntityDamage;
import tconstruct.util.PHConstruct;
public class AbilityHelper
{
@@ -206,9 +206,12 @@ public class AbilityHelper
}
//damageTool(stack, 1, player, false);
tool.onEntityDamaged(player.worldObj, player, entity);
int drain = toolTags.getInteger("Necrotic") * 2;
if (drain > 0)
player.heal(random.nextInt(drain + 1));
if (!PHConstruct.necroticUHS || (entity instanceof IMob && entity instanceof EntityLivingBase && ((EntityLivingBase) entity).func_110143_aJ() <= 0))
{
int drain = toolTags.getInteger("Necrotic") * 2;
if (drain > 0)
player.heal(random.nextInt(drain + 1));
}
if (knockback > 0)
{