Package net.minecraft.nbt

Examples of net.minecraft.nbt.NBTTagCompound.removeTag()


    }
    NBTTagCompound tagA = (NBTTagCompound)a.getTagCompound().copy(),
        tagB = (NBTTagCompound)b.getTagCompound().copy();
    tagA.removeTag("display"); tagB.removeTag("display");
    tagA.removeTag("ench"); tagB.removeTag("ench");
    tagA.removeTag("RepairCost"); tagB.removeTag("RepairCost");
    return tagA.equals(tagB);
  }
 
  //assumes a 3x3 grid in inventory slots 0-8
  //slot 0 is northwest, slot 2 is northeast, etc
View Full Code Here


        {
            return null;
        }
        NBTTagCompound nmsTag = new NBTTagCompound();
        tileEntity.writeToNBT(nmsTag);
        nmsTag.removeTag("x");
        nmsTag.removeTag("y");
        nmsTag.removeTag("z");
        return NBTHelper.getNBTFromNMSTagCompound(null, nmsTag);
    }
View Full Code Here

            return null;
        }
        NBTTagCompound nmsTag = new NBTTagCompound();
        tileEntity.writeToNBT(nmsTag);
        nmsTag.removeTag("x");
        nmsTag.removeTag("y");
        nmsTag.removeTag("z");
        return NBTHelper.getNBTFromNMSTagCompound(null, nmsTag);
    }

    @Override
View Full Code Here

        }
        NBTTagCompound nmsTag = new NBTTagCompound();
        tileEntity.writeToNBT(nmsTag);
        nmsTag.removeTag("x");
        nmsTag.removeTag("y");
        nmsTag.removeTag("z");
        return NBTHelper.getNBTFromNMSTagCompound(null, nmsTag);
    }

    @Override
    public CustomObjectStructureCache getStructureCache()
View Full Code Here

            PrintWriter p = new PrintWriter(file);
            p.println("#Saved in this format for external editing. The format isn't that hard to figure out. If you think you're up to it, modify it here!");

            for (ItemStackMap.Entry<Set<String>> entry : bannedItems.entries()) {
                NBTTagCompound key = InventoryUtils.savePersistant(entry.key, new NBTTagCompound());
                key.removeTag("Count");
                if(key.getByte("Damage") == 0) key.removeTag("Damage");

                p.print(key.toString());
                p.print("=[");
                int i = 0;
View Full Code Here

            p.println("#Saved in this format for external editing. The format isn't that hard to figure out. If you think you're up to it, modify it here!");

            for (ItemStackMap.Entry<Set<String>> entry : bannedItems.entries()) {
                NBTTagCompound key = InventoryUtils.savePersistant(entry.key, new NBTTagCompound());
                key.removeTag("Count");
                if(key.getByte("Damage") == 0) key.removeTag("Damage");

                p.print(key.toString());
                p.print("=[");
                int i = 0;
                for (String s : entry.value) {
View Full Code Here

    public void dumpJson(File file) throws IOException {
        PrintWriter p = new PrintWriter(file);
        for (ItemStack stack : ItemPanel.items) {
            NBTTagCompound tag = stack.writeToNBT(new NBTTagCompound());
            tag.removeTag("Count");
            p.println(tag);
        }

        p.close();
    }
View Full Code Here

    public static NBTTagCompound getMuseRenderTag(ItemStack stack, int armorSlot) {
        NBTTagCompound tag = getMuseItemTag(stack);
        if (!tag.hasKey("render") || !(tag.getTag("render") instanceof NBTTagCompound)) {
            MuseLogger.logDebug("TAG BREACH IMMINENT, PLEASE HOLD ONTO YOUR SEATBELTS");
            tag.removeTag("render");
            tag.setTag("render", DefaultModelSpec.makeModelPrefs(stack, armorSlot));
        }
        return tag.getCompoundTag("render");
    }
View Full Code Here

    }

    public static NBTTagCompound getMuseRenderTag(ItemStack stack) {
        NBTTagCompound tag = getMuseItemTag(stack);
        if (!tag.hasKey("render") || !(tag.getTag("render") instanceof NBTTagCompound)) {
            tag.removeTag("render");
            tag.setTag("render", new NBTTagCompound());
        }
        return tag.getCompoundTag("render");
    }
View Full Code Here

        if (args.length == 1)
        {
            if (args[0].equalsIgnoreCase("del"))
            {
                NBTTagCompound tag = sender.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG);
                tag.removeTag("nickname");
                sender.getEntityData().setTag(EntityPlayer.PERSISTED_NBT_TAG, tag);
                OutputHandler.chatConfirmation(sender, "Nickname removed.");
            }
            else
            {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.