diff --git a/build.prop b/build.prop index afd0d40..bd577f6 100644 --- a/build.prop +++ b/build.prop @@ -1,6 +1,6 @@ minecraft_version=1.7.10 forge_version=10.13.4.1558-1.7.10 tfc_version=0.79.27 -mod_version=1.01 +mod_version=1.02 mod_id=TerraFirmaPunkTweaks group_name=com.onewolfe.tfptweaks \ No newline at end of file diff --git a/builds/[1.7.10]TerraFirmaPunkTweaks-1.01.jar b/builds/[1.7.10]TerraFirmaPunkTweaks-1.01.jar deleted file mode 100644 index ecc4411..0000000 Binary files a/builds/[1.7.10]TerraFirmaPunkTweaks-1.01.jar and /dev/null differ diff --git a/builds/[1.7.10]TerraFirmaPunkTweaks-1.02.jar b/builds/[1.7.10]TerraFirmaPunkTweaks-1.02.jar new file mode 100644 index 0000000..02e346e Binary files /dev/null and b/builds/[1.7.10]TerraFirmaPunkTweaks-1.02.jar differ diff --git a/builds/[1.7.10]TerraFirmaPunkTweaks-deobf-1.01.jar b/builds/[1.7.10]TerraFirmaPunkTweaks-deobf-1.01.jar deleted file mode 100644 index 28f5340..0000000 Binary files a/builds/[1.7.10]TerraFirmaPunkTweaks-deobf-1.01.jar and /dev/null differ diff --git a/builds/[1.7.10]TerraFirmaPunkTweaks-deobf-1.02.jar b/builds/[1.7.10]TerraFirmaPunkTweaks-deobf-1.02.jar new file mode 100644 index 0000000..ac11f17 Binary files /dev/null and b/builds/[1.7.10]TerraFirmaPunkTweaks-deobf-1.02.jar differ diff --git a/builds/[1.7.10]TerraFirmaPunkTweaks-src-1.01.jar b/builds/[1.7.10]TerraFirmaPunkTweaks-src-1.02.jar similarity index 70% rename from builds/[1.7.10]TerraFirmaPunkTweaks-src-1.01.jar rename to builds/[1.7.10]TerraFirmaPunkTweaks-src-1.02.jar index bb476d5..391ef36 100644 Binary files a/builds/[1.7.10]TerraFirmaPunkTweaks-src-1.01.jar and b/builds/[1.7.10]TerraFirmaPunkTweaks-src-1.02.jar differ diff --git a/src/main/java/com/onewolfe/tfptweaks/PlayerHandler.java b/src/main/java/com/onewolfe/tfptweaks/PlayerHandler.java index 91ecc2c..98d63ef 100644 --- a/src/main/java/com/onewolfe/tfptweaks/PlayerHandler.java +++ b/src/main/java/com/onewolfe/tfptweaks/PlayerHandler.java @@ -5,11 +5,15 @@ import java.util.Random; import com.bioxx.tfc.api.TFCBlocks; import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.util.DamageSource; +import net.minecraftforge.event.entity.living.LivingHealEvent; +import net.minecraftforge.event.entity.living.LivingHurtEvent; import net.minecraftforge.event.entity.player.EntityItemPickupEvent; public class PlayerHandler @@ -33,4 +37,23 @@ public class PlayerHandler player.inventory.addItemStackToInventory(new ItemStack(TFCBlocks.chest, 1, 0)); } } + + @SubscribeEvent + public void onDamaged(LivingHurtEvent event) + { + if(event.ammount <= 20 && event.entity instanceof EntityPlayer) + { + event.ammount = event.ammount * 50; + + if(event.source == DamageSource.magic && (event.entityLiving.getHealth() - event.ammount) <= 0) + event.setCanceled(true); + } + } + + @SubscribeEvent + public void onHeal(LivingHealEvent event) + { + if(event.amount > 1 && event.amount < 9) + event.amount = event.amount * 50; + } }