Robotic Parts

Robotic Parts

2M Downloads

Crash with Better Animals Plus

itsmeow opened this issue ยท 6 comments

commented

crash-2018-09-30_01.05.08-server.txt
Here's my best explanation.
Our mod calls attackEntityFrom with a float value for damage
and apparently the Brain Upgrade is setting damage to an int?
This is line 323 of EntityLammergeier:
boolean flag = entityIn.attackEntityFrom(DamageSource.causeMobDamage(this), f);
where F is the attack damage of lammergeier (3.0F)

https://github.com/itsmeow/betteranimalsplus/blob/master/src/main/java/its_meow/betteranimalsplus/entity/EntityLammergeier.java
It has since moved to line 322 due to updates.

commented

Okay, I looked at ItemBrainUpgrade and it apparently is calling
ReflectionHelper.setPrivateValue(EntityLivingBase.class, e, 9999F, "lastDamage", "field_110153_bc");
Which causes
java.lang.IllegalArgumentException: Can not set int field net.minecraft.entity.EntityLivingBase.field_70744_aE to java.lang.Float

But that's not right because it is setting field_1110153_bc and lastDamage, and not 70744_aE.
Something fishy is happening here.

commented

Update: Determined what "field_70744_aE" is. It is protected integer "recentlyHit".
/** * Set to 60 when hit by the player or the player's wolf, then decrements. Used to determine whether the entity * should drop items on death. */ protected int recentlyHit;

110153_bc is protected float lastDamage (the other name for value being set), which should function as normal.

commented

this has already been addressed, the crash reports and your server log are 2 to 3 versions behind.

Please make sure you are using the most recent version of the mod before opening an issue.

commented

My bad. Closing.

commented

no worries, i appreciate all the investigation, but hopefully this one is already solved.