Ensure POI removal occurs on the correct thread

This commit is contained in:
Shane Freeder 2021-01-09 13:32:26 +00:00
parent 3a358f7e70
commit 442fa32443

View File

@ -33,8 +33,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
Optional<VillagePlaceType> optional1 = VillagePlaceType.b(iblockdata1);
+ // Paper start
+ if (!optional.isPresent() && this.getPoiStorage().test(blockposition, com.google.common.base.Predicates.alwaysTrue()))
+ this.getPoiStorage().remove(blockposition);
+ this.getMinecraftServer().execute(() -> {
+ if (!optional.isPresent() && this.getPoiStorage().test(blockposition, com.google.common.base.Predicates.alwaysTrue())) {
+ this.getPoiStorage().remove(blockposition);
+ }
+ });
+ // Paper end
if (!Objects.equals(optional, optional1)) {
BlockPosition blockposition1 = blockposition.immutableCopy();