mirror of
https://github.com/dje4321/TerrafirmaPunk-Tweaks.git
synced 2024-07-01 02:19:08 +00:00
Fix crash with vanilla arrows hitting mobs
Fix crash with vanilla arrows hitting mobs
This commit is contained in:
parent
0a00fdaa8f
commit
7962e92298
|
@ -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.08
|
||||
mod_version=1.09
|
||||
mod_id=TerraFirmaPunkTweaks
|
||||
group_name=com.JAWolfe.TerraFirmaPunkTweaks
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,6 +1,11 @@
|
|||
Changelog
|
||||
=================================================
|
||||
-------------------------------------------------
|
||||
TFP Tweaks 1.09
|
||||
-------------------------------------------------
|
||||
Bug Fix
|
||||
+Fixed crash from improper casting with mob damage from projectiles
|
||||
-------------------------------------------------
|
||||
TFP Tweaks 1.08
|
||||
-------------------------------------------------
|
||||
New Features
|
||||
|
|
|
@ -185,6 +185,8 @@ public class PlayerDamageHandler
|
|||
else if(event.ammount < 20 && !(event.entity instanceof EntityPlayer) && event.source != null && event.source.getEntity() != null &&
|
||||
!event.source.getEntity().getClass().getName().contains("bioxx.tfc") && (!event.source.getEntity().getEntityData().hasKey("Attacking") ||
|
||||
(event.source.getEntity().getEntityData().hasKey("Attacking") && !event.source.getEntity().getEntityData().getBoolean("Attacking"))))
|
||||
{
|
||||
if(event.source.getEntity() instanceof EntityLivingBase && ConfigSettings.VanillaMobDamageScaling)
|
||||
{
|
||||
EntityLivingBase attacker = (EntityLivingBase)event.source.getEntity();
|
||||
Entity target = event.entity;
|
||||
|
@ -247,6 +249,7 @@ public class PlayerDamageHandler
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(event.source == DamageSource.cactus && event.ammount <=3 && ConfigSettings.VanillaMobDamageScaling)
|
||||
{
|
||||
event.entity.attackEntityFrom(event.source, event.ammount * ConfigSettings.VanillaMobDamageMultipier);
|
||||
|
|
Loading…
Reference in New Issue
Block a user