Move around some NBT related stuff

This commit is contained in:
pahimar 2013-07-04 15:48:31 -04:00
parent b04b88f4d4
commit f8e79bbcba
13 changed files with 32 additions and 12 deletions

View file

@ -7,10 +7,10 @@ import net.minecraft.util.StatCollector;
import org.lwjgl.opengl.GL11;
import com.pahimar.ee3.core.util.NBTHelper;
import com.pahimar.ee3.inventory.ContainerAlchemicalBag;
import com.pahimar.ee3.lib.Strings;
import com.pahimar.ee3.lib.Textures;
import com.pahimar.ee3.nbt.NBTHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

View file

@ -8,10 +8,10 @@ import net.minecraft.world.World;
import org.lwjgl.opengl.GL11;
import com.pahimar.ee3.core.util.NBTHelper;
import com.pahimar.ee3.inventory.ContainerPortableCrafting;
import com.pahimar.ee3.lib.Strings;
import com.pahimar.ee3.lib.Textures;
import com.pahimar.ee3.nbt.NBTHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

View file

@ -6,9 +6,9 @@ import net.minecraft.item.ItemStack;
import org.lwjgl.opengl.GL11;
import com.pahimar.ee3.core.util.NBTHelper;
import com.pahimar.ee3.lib.Strings;
import com.pahimar.ee3.lib.Textures;
import com.pahimar.ee3.nbt.NBTHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

View file

@ -5,8 +5,8 @@ import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import com.pahimar.ee3.configuration.ConfigurationSettings;
import com.pahimar.ee3.core.util.NBTHelper;
import com.pahimar.ee3.lib.Strings;
import com.pahimar.ee3.nbt.NBTHelper;
import cpw.mods.fml.common.ICraftingHandler;

View file

@ -4,6 +4,24 @@ import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent;
public class InterModCommsHandler {
// TODO Method to encode a given "crafting relationship" as NBT data
/*
* NBTTagCompound
* - NBTTagList (recipeOutput)
* - NBTTagList (recipeInputs)
* - NBTTagList (recipeInput-1)
* - NBTTagList (recipeInput-2)
* - ...
* - NBTTagList (recipeInput-n)
*
* Method to encode stacks as NBTTagLists should:
* - track the "type" of the stack
* - track the size of the stack
* - track type specific data of the stack
* - e.g. id/meta/NBTTagCompound for ItemStacks
*/
public static void processIMCMessages(IMCEvent event) {
}

View file

@ -6,8 +6,8 @@ import net.minecraftforge.event.entity.item.ItemTossEvent;
import net.minecraftforge.event.entity.player.EntityItemPickupEvent;
import net.minecraftforge.event.entity.player.PlayerDropsEvent;
import com.pahimar.ee3.core.util.NBTHelper;
import com.pahimar.ee3.lib.Strings;
import com.pahimar.ee3.nbt.NBTHelper;
/**
* Equivalent-Exchange-3

View file

@ -6,8 +6,8 @@ import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import com.pahimar.ee3.core.util.NBTHelper;
import com.pahimar.ee3.lib.Strings;
import com.pahimar.ee3.nbt.NBTHelper;
/**
* Equivalent-Exchange-3

View file

@ -6,8 +6,8 @@ import net.minecraft.inventory.ContainerWorkbench;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import com.pahimar.ee3.core.util.NBTHelper;
import com.pahimar.ee3.lib.Strings;
import com.pahimar.ee3.nbt.NBTHelper;
/**
* Equivalent-Exchange-3

View file

@ -5,8 +5,8 @@ import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack;
import com.pahimar.ee3.core.util.NBTHelper;
import com.pahimar.ee3.lib.Strings;
import com.pahimar.ee3.nbt.NBTHelper;
/**
* Equivalent-Exchange-3

View file

@ -9,11 +9,11 @@ import net.minecraft.world.World;
import com.pahimar.ee3.EquivalentExchange3;
import com.pahimar.ee3.core.util.ItemUtil;
import com.pahimar.ee3.core.util.NBTHelper;
import com.pahimar.ee3.lib.Colours;
import com.pahimar.ee3.lib.GuiIds;
import com.pahimar.ee3.lib.Reference;
import com.pahimar.ee3.lib.Strings;
import com.pahimar.ee3.nbt.NBTHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

View file

@ -7,10 +7,10 @@ import net.minecraft.world.World;
import com.pahimar.ee3.EquivalentExchange3;
import com.pahimar.ee3.configuration.ConfigurationSettings;
import com.pahimar.ee3.core.util.NBTHelper;
import com.pahimar.ee3.core.util.TransmutationHelper;
import com.pahimar.ee3.lib.GuiIds;
import com.pahimar.ee3.lib.Strings;
import com.pahimar.ee3.nbt.NBTHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

View file

@ -7,11 +7,11 @@ import net.minecraft.world.World;
import com.pahimar.ee3.EquivalentExchange3;
import com.pahimar.ee3.configuration.ConfigurationSettings;
import com.pahimar.ee3.core.util.NBTHelper;
import com.pahimar.ee3.core.util.TransmutationHelper;
import com.pahimar.ee3.lib.GuiIds;
import com.pahimar.ee3.lib.Sounds;
import com.pahimar.ee3.lib.Strings;
import com.pahimar.ee3.nbt.NBTHelper;
import com.pahimar.ee3.network.PacketTypeHandler;
import com.pahimar.ee3.network.packet.PacketSoundEvent;

View file

@ -1,4 +1,4 @@
package com.pahimar.ee3.core.util;
package com.pahimar.ee3.nbt;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@ -14,6 +14,8 @@ import net.minecraft.nbt.NBTTagCompound;
*/
public class NBTHelper {
// TODO Write a method to encode a given stack (ItemStack | OreStack | EnergyStack) as a NBTTagList
/**
* Initializes the NBT Tag Compound for the given ItemStack if it is null
*