Class EntityRemovalSystem

All Implemented Interfaces:
ISystem<EntityStore>, QuerySystem<EntityStore>

public class EntityRemovalSystem extends RefSystem<EntityStore>
A ref system that tombstones an entity's persisted body row when the entity is permanently removed. The per-entity save paths (EntitySavingSystem, saveEntitySection, saveChunkColumn) write a UUID-keyed row per entity but, being UUID-keyed rather than coordinate-bounded, those rows can't be range-deleted alongside the chunk/section. Without this system a row would be orphaned every time its entity is removed or leaves the section it was last saved in, growing the store unbounded.

RemoveReason.REMOVE and RemoveReason.BUILDER_TOOLS_UNDO (both permanent removals) tombstone the row. RemoveReason.UNLOAD is left alone, because the entity still exists and is being persisted, not deleted. Non-cubic savers embed entities in the column holder, so per-entity removal doesn't apply to them.

  • Constructor Details

    • EntityRemovalSystem

      public EntityRemovalSystem()
  • Method Details