public void clearConfig() { nbtTagCompound = new TagCompound(); } }
public IconMenuItem addTag(String key, TagBase tag) { if (this.tag == null) { this.tag = new TagCompound(); } this.tag.put(key, tag); return this; }
public TagCompound save() { TagCompound nbtTagCompound = new TagCompound(); inv.save(nbtTagCompound); return nbtTagCompound; }
public TagCompound save() { TagCompound nbtTagCompound = new TagCompound(); nbtTagCompound.getCompoundData().put("Active", new TagByte(pickup)); return nbtTagCompound; }
@Override public TagCompound save() { TagCompound nbtTagCompound = new TagCompound(); nbtTagCompound.getCompoundData().put("Buffs", new TagIntArray(selectedBuffs.stream().mapToInt(Buff::getId).toArray())); nbtTagCompound.getCompoundData().put("Active", new TagByte(this.active)); nbtTagCompound.getCompoundData().put("Reciever", new TagString(this.receiver.name())); return nbtTagCompound; }
@SuppressWarnings("unchecked") public void applyTo(TagCompound tag) { if (hasOwner()) { TagCompound ownerTag = new TagCompound(); ownerTag.put("Name", new TagString(getOwner())); if (hasTexture()) { TagCompound propertiesTag = new TagCompound(); TagList textureList = new TagList(); TagCompound textureTag = new TagCompound(); JSONObject jsonObject = new JSONObject(); JSONObject texturesObject = new JSONObject(); JSONObject skinObject = new JSONObject(); jsonObject.put("textures", texturesObject); texturesObject.put("SKIN", skinObject); skinObject.put("url", getTexture()); String base64 = BaseEncoding.base64Url().encode(jsonObject.toJSONString().getBytes()); textureTag.put("Value", new TagString(base64)); textureList.addTag(textureTag); propertiesTag.put("textures", textureList); ownerTag.put("Properties", propertiesTag); } tag.put("SkullOwner", ownerTag); } }
public static TagCompound itemStackToCompund(ItemStack itemStack) { TagCompound compound = new TagCompound(); compound.getCompoundData().put("id", new TagShort((short) Item.getId(itemStack.getItem()))); compound.getCompoundData().put("Count", new TagByte((byte) itemStack.count)); compound.getCompoundData().put("Damage", new TagShort((short) itemStack.getData())); if (itemStack.getTag() != null) { compound.getCompoundData().put("tag", vanillaCompoundToCompound(itemStack.getTag())); } return compound; }
TagCompound compound = new TagCompound(); NBTTagCompound tagCompound = ((NBTTagCompound) vanillaTag); Set<String> keys = tagCompound.c();
TagCompound tag = new TagCompound(); icon.getMeta().applyTo(tag); NBTTagCompound vanillaTag = (NBTTagCompound) ItemStackNBTConverter.compoundToVanillaCompound(tag);
public TagCompound convertEntity(LivingEntity entity) { TagCompound properties = new TagCompound(); switch (entity.getType()) { case OCELOT: