Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-20 09:50:06 +01:00
Implement dirty workaround for get data from right ticking region
Dieser Commit ist enthalten in:
Ursprung
9d06640ab1
Commit
2b46e1901c
@ -61,7 +61,6 @@ import net.minecraft.world.level.chunk.PalettedContainerRO;
|
||||
import net.minecraft.world.level.levelgen.Heightmap;
|
||||
import net.minecraft.world.level.lighting.LevelLightEngine;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.craftbukkit.v1_19_R3.CraftWorld;
|
||||
import org.bukkit.craftbukkit.v1_19_R3.block.CraftBlock;
|
||||
@ -253,7 +252,8 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc
|
||||
if (entity == null) {
|
||||
return null;
|
||||
}
|
||||
return new PaperweightLazyCompoundTag(Suppliers.memoize(TaskManager.taskManager().syncAt(entity,
|
||||
return new PaperweightLazyCompoundTag(Suppliers.memoize(TaskManager.taskManager().syncAt(
|
||||
entity,
|
||||
new Location(new BukkitWorld(getChunk().bukkitChunk.getWorld()), Vector3.at(x, y, z))
|
||||
)::saveWithId));
|
||||
// return new PaperweightLazyCompoundTag(Suppliers.memoize(blockEntity::saveWithId));
|
||||
@ -773,10 +773,17 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc
|
||||
final BlockPos pos = new BlockPos(x, y, z);
|
||||
|
||||
synchronized (nmsWorld) {
|
||||
BlockEntity tileEntity = nmsWorld.getBlockEntity(pos);
|
||||
|
||||
BlockEntity tileEntity = TaskManager.taskManager().syncAt(
|
||||
() -> nmsWorld.getBlockEntity(pos),
|
||||
new Location(new BukkitWorld(getChunk().bukkitChunk.getWorld()), Vector3.at(x, y, z))
|
||||
);
|
||||
if (tileEntity == null || tileEntity.isRemoved()) {
|
||||
nmsWorld.removeBlockEntity(pos);
|
||||
tileEntity = nmsWorld.getBlockEntity(pos);
|
||||
tileEntity = TaskManager.taskManager().syncAt(
|
||||
() -> nmsWorld.getBlockEntity(pos),
|
||||
new Location(new BukkitWorld(getChunk().bukkitChunk.getWorld()), Vector3.at(x, y, z))
|
||||
);
|
||||
}
|
||||
if (tileEntity != null) {
|
||||
final net.minecraft.nbt.CompoundTag tag = (net.minecraft.nbt.CompoundTag) adapter.fromNative(
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren