SpongePowered / SpongeForge

A Forge mod that implements SpongeAPI
http://www.spongepowered.org/
MIT License
1.14k stars 306 forks source link

Entities Stuck/Cannot be killed #2906

Closed kristi71111 closed 5 years ago

kristi71111 commented 5 years ago

I am currently running

Issue Description Upon updating to 7.1.7-RC3859 from RC3843 naturally spawned mobs seem to be stuck and unable to be damaged or despawned. Sometimes they can be damaged and killed while sometimes even if you damage them they eventually get stuck and cannot be killed Providing video link to explain it better.Link to video.

gabizou commented 5 years ago

Can you upload the .mixin.output and CLASSLOADER_TEMP folders zipped up when you run the server with -Dmixin.debug.export=true -Dlegacy.debugClassLoading=true -Dlegacy.debugClaassLoadingSave=true? I have a feeling that somehow the injection points that I've written are no longer applying at the right places in some circumstances since moving away from an @Overwrite.

kristi71111 commented 5 years ago

Can you upload the .mixin.output and CLASSLOADER_TEMP folders zipped up when you run the server with -Dmixin.debug.export=true -Dlegacy.debugClassLoading=true -Dlegacy.debugClaassLoadingSave=true? I have a feeling that somehow the injection points that I've written are no longer applying at the right places in some circumstances since moving away from an @Overwrite.

As per request. Files were too big to be uploaded to github so attaching google drive link. Here

Animadoria commented 5 years ago

That happens to me too whenever entities change chunks.

TheFlash787 commented 5 years ago

I can confirm that this happens when unloading all un-used chunks with:

for(Chunk chunk : world.getLoadedChunks()){
    if(world.unloadChunk(chunk)){
        chunksUnloaded++;
    }
}

I noticed the same issue when using CatClearLag which uses Chunk#unload instead, but produced the same result where all entities (items included) would 'desync' and become unresponsive on the server, as shown in @kristi71111's video.

EDIT: I have also tested this whilst on SpongeVanilla and the same issue occurs.

Pulverizer commented 5 years ago

Can confirm on SpongeForge 1.12.2-2838-7.1.7-RC3856. @gabizou knows roughly how my plugin works.

Set<Entity> entities = craft.getWorld().getIntersectingEntities(new AABB(oldHitBox.getMinX() - 0.5, oldHitBox.getMinY() - 0.5, oldHitBox.getMinZ() - 0.5, oldHitBox.getMaxX() + 1.5, oldHitBox.getMaxY() + 1.5, oldHitBox.getMaxZ()+1.5));

Movecraft.getInstance().getLogger().info("Entity Count: " + entities.size());

I was stood in the area but console logged no entities.

Next attempt to move the craft it moved a stack of dropped items but not me. I picked up the moved stack of items but it left these in the old location. Can't pick them up or anything.

Pulverizer commented 5 years ago

Have tested and confirmed that these issues do not exist in RC3845.