Ars Nouveau

Ars Nouveau

49M Downloads

Game crashed when trying to shoot a ghost from "Ice and Fire" with a enchanter's bow combined with any spell.

Vearmus opened this issue ยท 8 comments

commented

The ghost is meant to be immune to all kinds of projectile.Projectile spell goes stright through the ghost,and arrow does the same.BUT,enchanter's bow makes the arrow casts the projectile spell,which causes the crash when the spell arrow hits the hitbox of the ghost.

commented

Hello,
Can you post the crash report?

commented

Sorry,I have no crash report.The game just got stuck forever when that thing happened,which makes me have to close the game. @baileyholl

commented

I have some experience with IaF Code and this repo as well, I will look into it but I need more infos @Vearmus. Which Forge Version, Ars Nouveau and which IaF version was used. Any other mods loaded as well?

commented

@tweakbsd
Forge Version:36.1.31
Ars Nouveau Version:1.16.5-1.18.6
Ice and Fire Version:2.1.7-1.16.5
No other mods except the required dependency.
123

commented

Ok thanks. In 3h I'm back at home from work and will investigate it and try to find a solution for this issue.

commented

Here comes the fix for this issue as promised earlier today :-)

When shooting a EntitySpellArrow at an Ice & Fire EntityGhost the current code is stuck in an infinite loop at Line 93,
EntitySpellArrow.java cause the Entity has noPhysics flag set and thus the break condition (this.removed) on the loop is never met.

Bugifx EntitySpellArrow.java Line 99:
if (raytraceresult != null && raytraceresult.getType() == RayTraceResult.Type.ENTITY) { Entity entity = ((EntityRayTraceResult) raytraceresult).getEntity(); Entity entity1 = this.getOwner(); // Bugfix is the following if-clause if(entity.noPhysics) { raytraceresult = null; entityraytraceresult = null; } else if (entity instanceof PlayerEntity && entity1 instanceof PlayerEntity && !((PlayerEntity) entity1).canHarmPlayer((PlayerEntity) entity)) { raytraceresult = null; entityraytraceresult = null; } }

Code is better seen in my PR at #283

commented

Here comes the fix for this issue as promised earlier today :-)

When shooting a EntitySpellArrow at an Ice & Fire EntityGhost the current code is stuck in an infinite loop at Line 93,
EntitySpellArrow.java cause the Entity has noPhysics flag set and thus the break condition (this.removed) on the loop is never met.

Bugifx EntitySpellArrow.java Line 99:
if (raytraceresult != null && raytraceresult.getType() == RayTraceResult.Type.ENTITY) { Entity entity = ((EntityRayTraceResult) raytraceresult).getEntity(); Entity entity1 = this.getOwner(); // Bugfix is the following if-clause if(entity.noPhysics) { raytraceresult = null; entityraytraceresult = null; } else if (entity instanceof PlayerEntity && entity1 instanceof PlayerEntity && !((PlayerEntity) entity1).canHarmPlayer((PlayerEntity) entity)) { raytraceresult = null; entityraytraceresult = null; } }

Code is better seen in my PR at #283

Thanks for the fixing,I'm hoping for more interesting features in the future!

commented

You're welcome. Just giving a little bit back to the awesome Minecraft Modding community!!