mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2025-03-02 11:21:20 +01:00
Remove debug + Sync sponge tile changes
This commit is contained in:
parent
97515d0f31
commit
0bac7251c1
@ -49,7 +49,7 @@ permissions:
|
||||
worldedit.clipboard.rotate: true
|
||||
worldedit.help: true
|
||||
worldedit.global-mask: true
|
||||
worldedit.global-trasnform: true
|
||||
worldedit.global-transform: true
|
||||
worldedit.generation.cylinder: true
|
||||
worldedit.generation.sphere: true
|
||||
worldedit.generation.forest: true
|
||||
|
@ -284,7 +284,6 @@ public class DiskOptimizedClipboard extends FaweClipboard implements Closeable {
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
MainUtil.stacktrace();
|
||||
try {
|
||||
if (mbb != null) {
|
||||
mbb.force();
|
||||
|
@ -381,20 +381,24 @@ public class SpongeChunk_1_12 extends CharFaweChunk<Chunk, SpongeQueue_1_12> {
|
||||
// Set tiles
|
||||
Map<Short, CompoundTag> tilesToSpawn = this.getTiles();
|
||||
|
||||
for (Map.Entry<Short, CompoundTag> entry : tilesToSpawn.entrySet()) {
|
||||
CompoundTag nativeTag = entry.getValue();
|
||||
short blockHash = entry.getKey();
|
||||
int x = (blockHash >> 12 & 0xF) + bx;
|
||||
int y = (blockHash & 0xFF);
|
||||
int z = (blockHash >> 8 & 0xF) + bz;
|
||||
BlockPos pos = new BlockPos(x, y, z); // Set pos
|
||||
TileEntity tileEntity = nmsWorld.getTileEntity(pos);
|
||||
if (tileEntity != null) {
|
||||
NBTTagCompound tag = (NBTTagCompound) SpongeQueue_1_12.methodFromNative.invoke(SpongeQueue_1_12.adapter, nativeTag);
|
||||
tag.setInteger("x", pos.getX());
|
||||
tag.setInteger("y", pos.getY());
|
||||
tag.setInteger("z", pos.getZ());
|
||||
tileEntity.readFromNBT(tag); // ReadTagIntoTile
|
||||
if (!tilesToSpawn.isEmpty()) {
|
||||
synchronized (SpongeChunk_1_12.class) {
|
||||
for (Map.Entry<Short, CompoundTag> entry : tilesToSpawn.entrySet()) {
|
||||
CompoundTag nativeTag = entry.getValue();
|
||||
short blockHash = entry.getKey();
|
||||
int x = (blockHash >> 12 & 0xF) + bx;
|
||||
int y = (blockHash & 0xFF);
|
||||
int z = (blockHash >> 8 & 0xF) + bz;
|
||||
BlockPos pos = new BlockPos(x, y, z); // Set pos
|
||||
TileEntity tileEntity = nmsWorld.getTileEntity(pos);
|
||||
if (tileEntity != null) {
|
||||
NBTTagCompound tag = (NBTTagCompound) SpongeQueue_1_12.methodFromNative.invoke(SpongeQueue_1_12.adapter, nativeTag);
|
||||
tag.setInteger("x", pos.getX());
|
||||
tag.setInteger("y", pos.getY());
|
||||
tag.setInteger("z", pos.getZ());
|
||||
tileEntity.readFromNBT(tag); // ReadTagIntoTile
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
|
@ -380,21 +380,24 @@ public class SpongeChunk_1_11 extends CharFaweChunk<Chunk, SpongeQueue_1_11> {
|
||||
}
|
||||
// Set tiles
|
||||
Map<Short, CompoundTag> tilesToSpawn = this.getTiles();
|
||||
|
||||
for (Map.Entry<Short, CompoundTag> entry : tilesToSpawn.entrySet()) {
|
||||
CompoundTag nativeTag = entry.getValue();
|
||||
short blockHash = entry.getKey();
|
||||
int x = (blockHash >> 12 & 0xF) + bx;
|
||||
int y = (blockHash & 0xFF);
|
||||
int z = (blockHash >> 8 & 0xF) + bz;
|
||||
BlockPos pos = new BlockPos(x, y, z); // Set pos
|
||||
TileEntity tileEntity = nmsWorld.getTileEntity(pos);
|
||||
if (tileEntity != null) {
|
||||
NBTTagCompound tag = (NBTTagCompound) SpongeQueue_1_11.methodFromNative.invoke(SpongeQueue_1_11.adapter, nativeTag);
|
||||
tag.setInteger("x", pos.getX());
|
||||
tag.setInteger("y", pos.getY());
|
||||
tag.setInteger("z", pos.getZ());
|
||||
tileEntity.readFromNBT(tag); // ReadTagIntoTile
|
||||
if (!tilesToSpawn.isEmpty()) {
|
||||
synchronized (SpongeChunk_1_11.class) {
|
||||
for (Map.Entry<Short, CompoundTag> entry : tilesToSpawn.entrySet()) {
|
||||
CompoundTag nativeTag = entry.getValue();
|
||||
short blockHash = entry.getKey();
|
||||
int x = (blockHash >> 12 & 0xF) + bx;
|
||||
int y = (blockHash & 0xFF);
|
||||
int z = (blockHash >> 8 & 0xF) + bz;
|
||||
BlockPos pos = new BlockPos(x, y, z); // Set pos
|
||||
TileEntity tileEntity = nmsWorld.getTileEntity(pos);
|
||||
if (tileEntity != null) {
|
||||
NBTTagCompound tag = (NBTTagCompound) SpongeQueue_1_11.methodFromNative.invoke(SpongeQueue_1_11.adapter, nativeTag);
|
||||
tag.setInteger("x", pos.getX());
|
||||
tag.setInteger("y", pos.getY());
|
||||
tag.setInteger("z", pos.getZ());
|
||||
tileEntity.readFromNBT(tag); // ReadTagIntoTile
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
|
Loading…
Reference in New Issue
Block a user