From b67fff66621c3b9bc183eafe0b803f4e6be692bd Mon Sep 17 00:00:00 2001 From: Octavia Togami <octavia.togami@gmail.com> Date: Mon, 15 Feb 2021 01:56:06 -0800 Subject: [PATCH] Use the convience methods for assembly --- .../internal/cui/ServerCUIHandler.java | 40 +++++++++---------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/cui/ServerCUIHandler.java b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/cui/ServerCUIHandler.java index 20d52e013..c979bf0dc 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/cui/ServerCUIHandler.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/cui/ServerCUIHandler.java @@ -28,11 +28,7 @@ import com.sk89q.worldedit.regions.CuboidRegion; import com.sk89q.worldedit.regions.RegionSelector; import com.sk89q.worldedit.regions.selector.CuboidRegionSelector; import com.sk89q.worldedit.util.Location; -import com.sk89q.worldedit.util.concurrency.LazyReference; -import com.sk89q.worldedit.util.nbt.ByteBinaryTag; import com.sk89q.worldedit.util.nbt.CompoundBinaryTag; -import com.sk89q.worldedit.util.nbt.IntBinaryTag; -import com.sk89q.worldedit.util.nbt.StringBinaryTag; import com.sk89q.worldedit.world.block.BaseBlock; import com.sk89q.worldedit.world.block.BlockTypes; @@ -135,24 +131,24 @@ public class ServerCUIHandler { return null; } - structureTag.put("name", StringBinaryTag.of("worldedit:" + player.getName())); - structureTag.put("author", StringBinaryTag.of(player.getName())); - structureTag.put("metadata", StringBinaryTag.of("")); - structureTag.put("x", IntBinaryTag.of(x)); - structureTag.put("y", IntBinaryTag.of(y)); - structureTag.put("z", IntBinaryTag.of(z)); - structureTag.put("posX", IntBinaryTag.of(posX)); - structureTag.put("posY", IntBinaryTag.of(posY)); - structureTag.put("posZ", IntBinaryTag.of(posZ)); - structureTag.put("sizeX", IntBinaryTag.of(width)); - structureTag.put("sizeY", IntBinaryTag.of(height)); - structureTag.put("sizeZ", IntBinaryTag.of(length)); - structureTag.put("rotation", StringBinaryTag.of("NONE")); - structureTag.put("mirror", StringBinaryTag.of("NONE")); - structureTag.put("mode", StringBinaryTag.of("SAVE")); - structureTag.put("ignoreEntities", ByteBinaryTag.of((byte) 1)); - structureTag.put("showboundingbox", ByteBinaryTag.of((byte) 1)); - structureTag.put("id", StringBinaryTag.of(BlockTypes.STRUCTURE_BLOCK.getId())); + structureTag.putString("name", "worldedit:" + player.getName()); + structureTag.putString("author", player.getName()); + structureTag.putString("metadata", ""); + structureTag.putInt("x", x); + structureTag.putInt("y", y); + structureTag.putInt("z", z); + structureTag.putInt("posX", posX); + structureTag.putInt("posY", posY); + structureTag.putInt("posZ", posZ); + structureTag.putInt("sizeX", width); + structureTag.putInt("sizeY", height); + structureTag.putInt("sizeZ", length); + structureTag.putString("rotation", "NONE"); + structureTag.putString("mirror", "NONE"); + structureTag.putString("mode", "SAVE"); + structureTag.putByte("ignoreEntities", (byte) 1); + structureTag.putByte("showboundingbox", (byte) 1); + structureTag.putString("id", BlockTypes.STRUCTURE_BLOCK.getId()); return BlockTypes.STRUCTURE_BLOCK.getDefaultState().toBaseBlock(structureTag.build()); }