Skip to content

Block entities are not properly removed when modifying a world with ArchetypeVolume #4222

@MrSlimeDiamond

Description

@MrSlimeDiamond

Affected Product(s)

SpongeVanilla

Version

1.21.1-12.0.2

Operating System

Windows

Java Version

21.0.7

Plugins/Mods

Sqlite Loader v1.0-3.43.2.1
Espial v2.0-SNAPSHOT

Describe the bug

When an ArchetypeVolume tries to modify a position where a block entity is present, it errors.

Sample code (which I'm trying to use for my plugin)

blockRecordMap.forEach((pos, record) -> {
    final BlockSnapshot snapshot = getSnapshot(record, rollback);
    volume.setBlock(pos, snapshot.state());
});
volume.applyToWorld(world, Vector3i.ZERO, SpawnTypes.PLUGIN);

In one scenario, a sign was trying to be set to air, and threw an error which is linked in the logs section

The chunk also fails to save

Upon further inspection, the blocks are actually set but errors are still thrown

Link to logs

https://paste.md-5.net/ocutisuxam.pl https://paste.md-5.net/oniwiyerom.pl

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs triageThis label is automatically applied to new issues and pull requests to indicate they require triagetype: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions