Forestry

Forestry

65M Downloads

NullPointerException when butterfly goes through Mining dimension portal

mcsoapthgr8 opened this issue ยท 3 comments

commented

Forestry version: 5.8.2.374
Aroma1997Core: 2.0.0.0.b161

I realize that this is on the line between 2 mods. I have reported it to Aroma1997Core also: https://versioned.temporary.solutions/AromasMods/Aroma1997Core/issues/39

I've had 3 crashes on an SMP server (full reset, restart required) today with the same trace as in this log file: https://gist.github.com/mcsoapthgr8/c89a6dbef055600d153f72fda60bc742

I've not seen the butterflies going through the portal. I'm presuming the cause from the stack trace.

I've turned off the butterflies for now as a workaround.

commented

This is caused by the entity returning null on entity.changeDimension.
I fixed this on my side by adding a null check and therefore getting rid of the entity, but I'm not sure if null being returned by said method is intentional.

commented

Seems that the method in entity can return null:

    @Nullable
    public Entity changeDimension(int dimensionIn)
    {
        if (this.world.isRemote || this.isDead) return null;
        return changeDimension(dimensionIn, this.getServer().getWorld(dimensionIn).getDefaultTeleporter());
    }

I don't know if the forestry butterfly should be though.

commented

The only thing forestry does is disable the dimension change by canceling the EntityTravelToDimensionEvent. I added it because some butterflies got stuck in dimensions with a climate that they couldn't fly in. #2209