Railcraft

Railcraft

34M Downloads

CartTools.getMinecartsAt() style methods don't take cart.isDead into account == explosions

rjenkins8142 opened this issue ยท 6 comments

commented

This is related to #155 and the "ghost" carts.

Now that the main hook is checking for isDead, collisions aren't happening, but it looks like those ghost "dead" carts are piling up.

So when you do your onMinecartEntityCollision check, and it does the random getMinecartsAt() check, it finds 12 or more and it causes an explosion. Thus, if the cart hits a pigman or a player near the nether portal entrance where all the dead ghost carts are, there's a decent chance you'll have a bit of a crater (and possibly a missing nether portal.) With a constantly running nether tank cart system, this is happening approximately once a day.

I'm still investigating / tracking down the base cause of the ghost carts, but it would be nice if some kind of isDead check was added to the base Cart classes to destroy themselves if they are "dead". Or perhaps isDead checks could be added to the getMinecartsAt style methods in CartTools / CartUtils.

commented

Well the thing is... entities already have a "if(isDead) removeFromWorld()" clause.

commented

Well, it appears what is supposed to happen is World.updateEntities() is supposed to remove all dead entities after the next tick, but for some reason this is definitely not happening.

I'll try to spend some time tracing down wtf is actually going on. At first glance, it almost looks like these "ghosts" aren't being added to the loadedEntityList in the world somehow, so are never cleaned up.

commented

Yeah, that was where my thoughts were heading as well, but I couldn't see anyway it could happen.

I will however change it to filter out dead entities from my utility functions.

commented

Thanks for this!

However, you've bumped the forge requirement to 965 for the ghost entity fix, but 965 doesn't have it. From what I can tell, they'll need to release a 953a style version with it. The forge versions above 953 are pretty unstable and in transition, and from what I can tell, cpw put the fix in a v164-pregradle branch that branches from 953.

commented

@rjenkins8142 That's exactly what 965 is. Its a fork off of 953 created specifically by cpw to address the replaceable tile entity bug.

commented

Ok, thanks.

It isn't clear at all on files.minecraftforge.net exactly what 965 is :) It has a date of Nov 21 and no real changelog for it. Because of the date, I thought it was old and one of the "broken" builds.