Package net.minecraft.nbt

Examples of net.minecraft.nbt.NBTTagCompound


  public static void addCrucibleRecipe(int energy, ItemStack input, FluidStack output) {

    if (input == null || output == null) {
      return;
    }
    NBTTagCompound toSend = new NBTTagCompound();

    toSend.setInteger("energy", energy);
    toSend.setTag("input", new NBTTagCompound());
    toSend.setTag("output", new NBTTagCompound());

    input.writeToNBT(toSend.getCompoundTag("input"));
    output.writeToNBT(toSend.getCompoundTag("output"));

    FMLInterModComms.sendMessage("ThermalExpansion", "CrucibleRecipe", toSend);
  }
View Full Code Here


  public static void addTransposerFill(int energy, ItemStack input, ItemStack output, FluidStack fluid, boolean reversible) {

    if (input == null || output == null || fluid == null) {
      return;
    }
    NBTTagCompound toSend = new NBTTagCompound();

    toSend.setInteger("energy", energy);
    toSend.setTag("input", new NBTTagCompound());
    toSend.setTag("output", new NBTTagCompound());
    toSend.setTag("fluid", new NBTTagCompound());

    input.writeToNBT(toSend.getCompoundTag("input"));
    output.writeToNBT(toSend.getCompoundTag("output"));
    toSend.setBoolean("reversible", reversible);
    fluid.writeToNBT(toSend.getCompoundTag("fluid"));

    FMLInterModComms.sendMessage("ThermalExpansion", "TransposerFillRecipe", toSend);
  }
View Full Code Here

  public static void addTransposerExtract(int energy, ItemStack input, ItemStack output, FluidStack fluid, int chance, boolean reversible) {

    if (input == null || output == null || fluid == null) {
      return;
    }
    NBTTagCompound toSend = new NBTTagCompound();

    toSend.setInteger("energy", energy);
    toSend.setTag("input", new NBTTagCompound());
    toSend.setTag("output", new NBTTagCompound());
    toSend.setTag("fluid", new NBTTagCompound());

    input.writeToNBT(toSend.getCompoundTag("input"));
    output.writeToNBT(toSend.getCompoundTag("output"));
    toSend.setBoolean("reversible", reversible);
    toSend.setInteger("chance", chance);
    fluid.writeToNBT(toSend.getCompoundTag("fluid"));

    FMLInterModComms.sendMessage("ThermalExpansion", "TransposerExtractRecipe", toSend);
  }
View Full Code Here

    FMLInterModComms.sendMessage("ThermalExpansion", "TransposerExtractRecipe", toSend);
  }

  public static void addMagmaticFuel(String fluidName, int energy) {

    NBTTagCompound toSend = new NBTTagCompound();

    toSend.setString("fluidName", fluidName);
    toSend.setInteger("energy", energy);

    FMLInterModComms.sendMessage("ThermalExpansion", "MagmaticFuel", toSend);
  }
View Full Code Here

    FMLInterModComms.sendMessage("ThermalExpansion", "MagmaticFuel", toSend);
  }

  public static void addCompressionFuel(String fluidName, int energy) {

    NBTTagCompound toSend = new NBTTagCompound();

    toSend.setString("fluidName", fluidName);
    toSend.setInteger("energy", energy);

    FMLInterModComms.sendMessage("ThermalExpansion", "CompressionFuel", toSend);
  }
View Full Code Here

    FMLInterModComms.sendMessage("ThermalExpansion", "CompressionFuel", toSend);
  }

  public static void addReactantFuel(String fluidName, int energy) {

    NBTTagCompound toSend = new NBTTagCompound();

    toSend.setString("fluidName", fluidName);
    toSend.setInteger("energy", energy);

    FMLInterModComms.sendMessage("ThermalExpansion", "ReactantFuel", toSend);
  }
View Full Code Here

    FMLInterModComms.sendMessage("ThermalExpansion", "ReactantFuel", toSend);
  }

  public static void addCoolant(String fluidName, int energy) {

    NBTTagCompound toSend = new NBTTagCompound();

    toSend.setString("fluidName", fluidName);
    toSend.setInteger("energy", energy);

    FMLInterModComms.sendMessage("ThermalExpansion", "Coolant", toSend);
  }
View Full Code Here

    }

    if (holes < minHoles || holes > maxHoles)
      return false;

    NBTTagCompound tag = (NBTTagCompound) ((WeightedRandomNBTTag)WeightedRandom.getRandomItem(rand, spawners)).tag;
    ChestGenHooks table = ChestGenHooks.getInfo(((DungeonMob)WeightedRandom.getRandomItem(rand, lootTables)).type);

    for (x = xStart - xWidth - 1; x <= xStart + xWidth + 1; ++x) {
      for (z = zStart - zWidth - 1; z <= zStart + zWidth + 1; ++z) {
        for (y = yStart + height; y >= floor; --y) {
View Full Code Here

        }
       
        NBTTagList var2 = par1NBTTagCompound.getTagList("Items");
        for (int var3 = 0; var3 < var2.tagCount(); ++var3)
        {
            NBTTagCompound var4 = (NBTTagCompound) var2.tagAt(var3);
            byte var5 = var4.getByte("Slot");
           
            if (var5 >= 0 && var5 < this.inventory.length)
            {
                this.inventory[var5] = ItemStack.loadItemStackFromNBT(var4);
            }
View Full Code Here

       
        for (int var3 = 0; var3 < this.inventory.length; ++var3)
        {
            if (this.inventory[var3] != null)
            {
                NBTTagCompound var4 = new NBTTagCompound();
                var4.setByte("Slot", (byte) var3);
                this.inventory[var3].writeToNBT(var4);
                var2.appendTag(var4);
            }
        }
        par1NBTTagCompound.setTag("Items", var2);
View Full Code Here

TOP

Related Classes of net.minecraft.nbt.NBTTagCompound

Copyright © 2018 www.massapicom. 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.