Examples of readFromNBT()


Examples of net.minecraft.tileentity.TileEntity.readFromNBT()

        if (nbt != null)
        {
            te = world.getTileEntity(x, y, z);
            if (te != null)
            {
                te.readFromNBT(nbt);
            }
        }

        if (DEBUG)
        {
View Full Code Here

Examples of pneumaticCraft.common.block.tubes.TubeModule.readFromNBT()

        modules = new TubeModule[6];
        NBTTagList moduleList = nbt.getTagList("modules", 10);
        for(int i = 0; i < moduleList.tagCount(); i++) {
            NBTTagCompound moduleTag = moduleList.getCompoundTagAt(i);
            TubeModule module = ModuleRegistrator.getModule(moduleTag.getString("type"));
            module.readFromNBT(moduleTag);
            setModule(module, ForgeDirection.getOrientation(moduleTag.getInteger("side")));
        }
    }

    @Override
View Full Code Here

Examples of pneumaticCraft.common.progwidgets.IProgWidget.readFromNBT()

            NBTTagCompound widgetTag = widgetTags.getCompoundTagAt(i);
            String widgetName = widgetTag.getString("name");
            for(IProgWidget widget : registeredWidgets) {
                if(widgetName.equals(widget.getWidgetString()) || widgetName.equals(widget.getLegacyString())) {//create the right progWidget for the given id tag.
                    IProgWidget addedWidget = widget.copy();
                    addedWidget.readFromNBT(widgetTag);
                    progWidgets.add(addedWidget);
                    break;
                }
            }
        }
View Full Code Here

Examples of thaumcraft.api.aspects.AspectList.readFromNBT()

    public static Aspect getAspect(ItemStack stack) {
        AspectList aspectList = new AspectList();
        if (stack.getTagCompound() == null) {
            stack.setTagCompound(new NBTTagCompound());
        }
        aspectList.readFromNBT(stack.getTagCompound().getCompoundTag(NBT_MAIN_ASPECT));

        return aspectList.size() == 0 ? null : aspectList.getAspects()[0];
    }

View Full Code Here

Examples of thaumcraft.api.aspects.AspectList.readFromNBT()

    public static AspectList getAspectTendencies(ItemStack stack) {
        AspectList aspectList = new AspectList();
        if (stack.getTagCompound() == null) {
            stack.setTagCompound(new NBTTagCompound());
        }
        aspectList.readFromNBT(stack.getTagCompound().getCompoundTag(NBT_ASPEPCT_TENDENCIES));

        return aspectList;
    }

View Full Code Here

Examples of thaumcraft.api.aspects.AspectList.readFromNBT()

    }

    public void readCustomNBT(NBTTagCompound nbt) {

        AspectList aspectList = new AspectList();
        aspectList.readFromNBT(nbt.getCompoundTag(NBT_MAIN_ASPECT));
        aspect = aspectList.getAspects()[0];
        aspectList.readFromNBT(nbt.getCompoundTag(NBT_ASPEPCT_TENDENCIES));
        primalTendencies = aspectList;
    }
View Full Code Here

Examples of thaumcraft.api.aspects.AspectList.readFromNBT()

    public void readCustomNBT(NBTTagCompound nbt) {

        AspectList aspectList = new AspectList();
        aspectList.readFromNBT(nbt.getCompoundTag(NBT_MAIN_ASPECT));
        aspect = aspectList.getAspects()[0];
        aspectList.readFromNBT(nbt.getCompoundTag(NBT_ASPEPCT_TENDENCIES));
        primalTendencies = aspectList;
    }

    @Override
    public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
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.