diff --git a/ee3_common/com/pahimar/ee3/client/gui/inventory/GuiAlchemicalBag.java b/ee3_common/com/pahimar/ee3/client/gui/inventory/GuiAlchemicalBag.java index fda132e7..d4091e91 100644 --- a/ee3_common/com/pahimar/ee3/client/gui/inventory/GuiAlchemicalBag.java +++ b/ee3_common/com/pahimar/ee3/client/gui/inventory/GuiAlchemicalBag.java @@ -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; diff --git a/ee3_common/com/pahimar/ee3/client/gui/inventory/GuiPortableCrafting.java b/ee3_common/com/pahimar/ee3/client/gui/inventory/GuiPortableCrafting.java index 93682310..918e5aba 100644 --- a/ee3_common/com/pahimar/ee3/client/gui/inventory/GuiPortableCrafting.java +++ b/ee3_common/com/pahimar/ee3/client/gui/inventory/GuiPortableCrafting.java @@ -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; diff --git a/ee3_common/com/pahimar/ee3/client/gui/inventory/GuiPortableTransmutation.java b/ee3_common/com/pahimar/ee3/client/gui/inventory/GuiPortableTransmutation.java index c1301d40..60ba543b 100644 --- a/ee3_common/com/pahimar/ee3/client/gui/inventory/GuiPortableTransmutation.java +++ b/ee3_common/com/pahimar/ee3/client/gui/inventory/GuiPortableTransmutation.java @@ -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; diff --git a/ee3_common/com/pahimar/ee3/core/handlers/CraftingHandler.java b/ee3_common/com/pahimar/ee3/core/handlers/CraftingHandler.java index 2075f0b8..75d6b506 100644 --- a/ee3_common/com/pahimar/ee3/core/handlers/CraftingHandler.java +++ b/ee3_common/com/pahimar/ee3/core/handlers/CraftingHandler.java @@ -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; diff --git a/ee3_common/com/pahimar/ee3/core/handlers/InterModCommsHandler.java b/ee3_common/com/pahimar/ee3/core/handlers/InterModCommsHandler.java index 2635e2d8..e5c1b12d 100644 --- a/ee3_common/com/pahimar/ee3/core/handlers/InterModCommsHandler.java +++ b/ee3_common/com/pahimar/ee3/core/handlers/InterModCommsHandler.java @@ -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) { } diff --git a/ee3_common/com/pahimar/ee3/core/handlers/ItemEventHandler.java b/ee3_common/com/pahimar/ee3/core/handlers/ItemEventHandler.java index 70d0f2c3..1017f4a4 100644 --- a/ee3_common/com/pahimar/ee3/core/handlers/ItemEventHandler.java +++ b/ee3_common/com/pahimar/ee3/core/handlers/ItemEventHandler.java @@ -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 diff --git a/ee3_common/com/pahimar/ee3/inventory/ContainerAlchemicalBag.java b/ee3_common/com/pahimar/ee3/inventory/ContainerAlchemicalBag.java index fe9cdaf7..fc417a2c 100644 --- a/ee3_common/com/pahimar/ee3/inventory/ContainerAlchemicalBag.java +++ b/ee3_common/com/pahimar/ee3/inventory/ContainerAlchemicalBag.java @@ -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 diff --git a/ee3_common/com/pahimar/ee3/inventory/ContainerPortableCrafting.java b/ee3_common/com/pahimar/ee3/inventory/ContainerPortableCrafting.java index 91eda2a1..37b41052 100644 --- a/ee3_common/com/pahimar/ee3/inventory/ContainerPortableCrafting.java +++ b/ee3_common/com/pahimar/ee3/inventory/ContainerPortableCrafting.java @@ -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 diff --git a/ee3_common/com/pahimar/ee3/inventory/ContainerPortableTransmutation.java b/ee3_common/com/pahimar/ee3/inventory/ContainerPortableTransmutation.java index 9fe70fce..fac5c572 100644 --- a/ee3_common/com/pahimar/ee3/inventory/ContainerPortableTransmutation.java +++ b/ee3_common/com/pahimar/ee3/inventory/ContainerPortableTransmutation.java @@ -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 diff --git a/ee3_common/com/pahimar/ee3/item/ItemAlchemicalBag.java b/ee3_common/com/pahimar/ee3/item/ItemAlchemicalBag.java index bd4b3960..805d9ce4 100644 --- a/ee3_common/com/pahimar/ee3/item/ItemAlchemicalBag.java +++ b/ee3_common/com/pahimar/ee3/item/ItemAlchemicalBag.java @@ -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; diff --git a/ee3_common/com/pahimar/ee3/item/ItemMiniumStone.java b/ee3_common/com/pahimar/ee3/item/ItemMiniumStone.java index c0f8c20e..c19fd90c 100644 --- a/ee3_common/com/pahimar/ee3/item/ItemMiniumStone.java +++ b/ee3_common/com/pahimar/ee3/item/ItemMiniumStone.java @@ -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; diff --git a/ee3_common/com/pahimar/ee3/item/ItemPhilosophersStone.java b/ee3_common/com/pahimar/ee3/item/ItemPhilosophersStone.java index 717cf1a4..4a8ac3e4 100644 --- a/ee3_common/com/pahimar/ee3/item/ItemPhilosophersStone.java +++ b/ee3_common/com/pahimar/ee3/item/ItemPhilosophersStone.java @@ -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; diff --git a/ee3_common/com/pahimar/ee3/core/util/NBTHelper.java b/ee3_common/com/pahimar/ee3/nbt/NBTHelper.java similarity index 97% rename from ee3_common/com/pahimar/ee3/core/util/NBTHelper.java rename to ee3_common/com/pahimar/ee3/nbt/NBTHelper.java index e2b1ac8d..5d8cdf14 100644 --- a/ee3_common/com/pahimar/ee3/core/util/NBTHelper.java +++ b/ee3_common/com/pahimar/ee3/nbt/NBTHelper.java @@ -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 *