clone POI blockpos before dispatching

This commit is contained in:
Shane Freeder 2021-01-10 18:36:38 +00:00
parent 1105e1ec76
commit 8a917b49f4

View File

@ -33,15 +33,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
Optional<VillagePlaceType> optional1 = VillagePlaceType.b(iblockdata1);
+ // Paper start
+ BlockPosition blockposition1 = blockposition.immutableCopy();
+ this.getMinecraftServer().execute(() -> {
+ if (!optional.isPresent() && this.getPoiStorage().test(blockposition, com.google.common.base.Predicates.alwaysTrue())) {
+ this.getPoiStorage().remove(blockposition);
+ if (!optional.isPresent() && this.getPoiStorage().test(blockposition1, com.google.common.base.Predicates.alwaysTrue())) {
+ this.getPoiStorage().remove(blockposition1);
+ }
+ });
+ // Paper end
if (!Objects.equals(optional, optional1)) {
BlockPosition blockposition1 = blockposition.immutableCopy();
- BlockPosition blockposition1 = blockposition.immutableCopy();
+ //BlockPosition blockposition1 = blockposition.immutableCopy();
+ // Paper end
optional.ifPresent((villageplacetype) -> {
this.getMinecraftServer().execute(() -> {
@@ -0,0 +0,0 @@ public class WorldServer extends World implements GeneratorAccessSeed {
}
}