Skip to content

Commit b67fff6

Browse files
committed
Use the convience methods for assembly
1 parent fb5d7f8 commit b67fff6

File tree

1 file changed

+18
-22
lines changed

1 file changed

+18
-22
lines changed

worldedit-core/src/main/java/com/sk89q/worldedit/internal/cui/ServerCUIHandler.java

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,7 @@
2828
import com.sk89q.worldedit.regions.RegionSelector;
2929
import com.sk89q.worldedit.regions.selector.CuboidRegionSelector;
3030
import com.sk89q.worldedit.util.Location;
31-
import com.sk89q.worldedit.util.concurrency.LazyReference;
32-
import com.sk89q.worldedit.util.nbt.ByteBinaryTag;
3331
import com.sk89q.worldedit.util.nbt.CompoundBinaryTag;
34-
import com.sk89q.worldedit.util.nbt.IntBinaryTag;
35-
import com.sk89q.worldedit.util.nbt.StringBinaryTag;
3632
import com.sk89q.worldedit.world.block.BaseBlock;
3733
import com.sk89q.worldedit.world.block.BlockTypes;
3834

@@ -135,24 +131,24 @@ public static BaseBlock createStructureBlock(Player player) {
135131
return null;
136132
}
137133

138-
structureTag.put("name", StringBinaryTag.of("worldedit:" + player.getName()));
139-
structureTag.put("author", StringBinaryTag.of(player.getName()));
140-
structureTag.put("metadata", StringBinaryTag.of(""));
141-
structureTag.put("x", IntBinaryTag.of(x));
142-
structureTag.put("y", IntBinaryTag.of(y));
143-
structureTag.put("z", IntBinaryTag.of(z));
144-
structureTag.put("posX", IntBinaryTag.of(posX));
145-
structureTag.put("posY", IntBinaryTag.of(posY));
146-
structureTag.put("posZ", IntBinaryTag.of(posZ));
147-
structureTag.put("sizeX", IntBinaryTag.of(width));
148-
structureTag.put("sizeY", IntBinaryTag.of(height));
149-
structureTag.put("sizeZ", IntBinaryTag.of(length));
150-
structureTag.put("rotation", StringBinaryTag.of("NONE"));
151-
structureTag.put("mirror", StringBinaryTag.of("NONE"));
152-
structureTag.put("mode", StringBinaryTag.of("SAVE"));
153-
structureTag.put("ignoreEntities", ByteBinaryTag.of((byte) 1));
154-
structureTag.put("showboundingbox", ByteBinaryTag.of((byte) 1));
155-
structureTag.put("id", StringBinaryTag.of(BlockTypes.STRUCTURE_BLOCK.getId()));
134+
structureTag.putString("name", "worldedit:" + player.getName());
135+
structureTag.putString("author", player.getName());
136+
structureTag.putString("metadata", "");
137+
structureTag.putInt("x", x);
138+
structureTag.putInt("y", y);
139+
structureTag.putInt("z", z);
140+
structureTag.putInt("posX", posX);
141+
structureTag.putInt("posY", posY);
142+
structureTag.putInt("posZ", posZ);
143+
structureTag.putInt("sizeX", width);
144+
structureTag.putInt("sizeY", height);
145+
structureTag.putInt("sizeZ", length);
146+
structureTag.putString("rotation", "NONE");
147+
structureTag.putString("mirror", "NONE");
148+
structureTag.putString("mode", "SAVE");
149+
structureTag.putByte("ignoreEntities", (byte) 1);
150+
structureTag.putByte("showboundingbox", (byte) 1);
151+
structureTag.putString("id", BlockTypes.STRUCTURE_BLOCK.getId());
156152

157153
return BlockTypes.STRUCTURE_BLOCK.getDefaultState().toBaseBlock(structureTag.build());
158154
}

0 commit comments

Comments
 (0)