Java Code Examples for net.querz.nbt.tag.CompoundTag#putString()
The following examples show how to use
net.querz.nbt.tag.CompoundTag#putString() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MCAChunkData.java From mcaselector with MIT License | 5 votes |
static MCAChunkData newEmptyLevelMCAChunkData(Point2i absoluteLocation, int dataVersion) { MCAChunkData mcaChunkData = new MCAChunkData(absoluteLocation, 0, 0, (byte) 1); CompoundTag root = new CompoundTag(); CompoundTag level = new CompoundTag(); level.putInt("xPos", absoluteLocation.getX()); level.putInt("zPos", absoluteLocation.getY()); level.putString("Status", "full"); root.put("Level", level); root.putInt("DataVersion", dataVersion); mcaChunkData.data = root; mcaChunkData.compressionType = CompressionType.ZLIB; return mcaChunkData; }
Example 2
Source File: Section.java From NBT with MIT License | 5 votes |
/** * Creates an empty Section with base values. * @return An empty Section */ public static Section newSection() { Section s = new Section(); s.blockStates = new long[256]; s.palette = new ListTag<>(CompoundTag.class); CompoundTag air = new CompoundTag(); air.putString("Name", "minecraft:air"); s.palette.add(air); s.data = new CompoundTag(); return s; }
Example 3
Source File: Chunk.java From NBT with MIT License | 5 votes |
public CompoundTag updateHandle(int xPos, int zPos) { data.putInt("DataVersion", dataVersion); CompoundTag level = data.getCompoundTag("Level"); level.putInt("xPos", xPos); level.putInt("zPos", zPos); level.putLong("LastUpdate", lastUpdate); level.putLong("InhabitedTime", inhabitedTime); if (dataVersion < 2202) { if (biomes != null && biomes.length == 256) level.putIntArray("Biomes", biomes); } else { if (biomes != null && biomes.length == 1024) level.putIntArray("Biomes", biomes); } if (heightMaps != null) level.put("Heightmaps", heightMaps); if (carvingMasks != null) level.put("CarvingMasks", carvingMasks); if (entities != null) level.put("Entities", entities); if (tileEntities != null) level.put("TileEntities", tileEntities); if (tileTicks != null) level.put("TileTicks", tileTicks); if (liquidTicks != null) level.put("LiquidTicks", liquidTicks); if (lights != null) level.put("Lights", lights); if (liquidsToBeTicked != null) level.put("LiquidsToBeTicked", liquidsToBeTicked); if (toBeTicked != null) level.put("ToBeTicked", toBeTicked); if (postProcessing != null) level.put("PostProcessing", postProcessing); level.putString("Status", status); if (structures != null) level.put("Structures", structures); ListTag<CompoundTag> sections = new ListTag<>(CompoundTag.class); for (int i = 0; i < this.sections.length; i++) { if (this.sections[i] != null) { sections.add(this.sections[i].updateHandle(i)); } } level.put("Sections", sections); return data; }
Example 4
Source File: MCATestCase.java From NBT with MIT License | 4 votes |
public CompoundTag block(String name) { CompoundTag c = new CompoundTag(); c.putString("Name", name); return c; }
Example 5
Source File: MCATestCase.java From NBT with MIT License | 4 votes |
public CompoundTag getSomeCompoundTag() { CompoundTag c = new CompoundTag(); c.putString("Dummy", "dummy"); return c; }