Commit graph

5 commits

Author SHA1 Message Date
Aikar 444ce86194
Entity add to world fixes - #1223
1) Chunk Registration might kill an entity, don't add it to the world if it did!

2) By default, entities are added to the world per slice iteration.
This opens risk of the slices being manipulated during chunk add if an
EntityAddToWorldEvent spawns an entity into this chunk.
Fix this by differing entity add to world for all entities at the same time

3) If a duplicate entity is attempted to add to the world of an entity, and
the original entity is dead, overwrite it as the logic does for unloaod queued entities.

Should hopefully finish up issues with #1223
2018-08-03 23:02:44 -04:00
Aikar b3eb265ab5
Fix logic bug in negative XP bug fix - Closes #1169 2018-08-03 20:59:35 -04:00
Aikar 56b92ff216
Fix EXP orb merging causing values to go negative - Closes #1169 2018-08-03 00:06:20 -04:00
Aikar 2c6773c85f
Fix Dupe UUID logic triggering when the duplicate is pending unload
Vanilla logic checks unload queue and overwrites if its in it.
we're triggering this if a chunk unloads, and reloads immediately in same tick.

Added check for unload queue to not treat as duplicate

Also fixed the config setting not even loading
2018-07-28 01:20:06 -04:00
Aikar 42f6bebcc3
Prevent Saving Bad entities to chunks
See https://github.com/PaperMC/Paper/issues/1223

Should fix Vanilla bugs

Minecraft is saving invalid entities to the chunk files.

Avoid saving bad data, and also make improvements to handle
loading these chunks. Any invalid entity will be instant killed,
so lets avoid adding it to the world...

This lets us be safer about the dupe UUID resolver too, as now
we can ignore instant killed entities and avoid risk of duplicating
an invalid entity.

This should reduce log occurrences of dupe uuid messages.

Also reduce the logging spam overall.
2018-07-26 00:51:20 -04:00