Getting ready for transmutation and alchemy squares

This commit is contained in:
Pahimar 2014-09-16 22:58:54 -04:00
parent 95d67e1f05
commit 07fd936081
20 changed files with 56 additions and 426 deletions

View file

@ -115,19 +115,6 @@ public final class EnergyValueRegistryProxy
return EE3Wrapper.ee3mod.getEnergyValueRegistry().getStacksInRange(start, finish); return EE3Wrapper.ee3mod.getEnergyValueRegistry().getStacksInRange(start, finish);
} }
public static String getStageValueWasAssigned(Object object)
{
init();
// NOOP if EquivalentExchange3 is not present
if (ee3Mod == null)
{
return "";
}
return EE3Wrapper.ee3mod.getEnergyValueRegistry().getStageValueWasAssigned(object);
}
private static class EE3Wrapper private static class EE3Wrapper
{ {
private static EquivalentExchange3 ee3mod; private static EquivalentExchange3 ee3mod;

View file

@ -1,20 +0,0 @@
package com.pahimar.ee3.block;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class BlockAlchemySquare extends BlockEE implements ITileEntityProvider
{
/**
* Returns a new instance of a block's tile entity class. Called on placing the block.
*
* @param p_149915_1_
* @param p_149915_2_
*/
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
{
return null;
}
}

View file

@ -0,0 +1,49 @@
package com.pahimar.ee3.block;
import com.pahimar.ee3.reference.Names;
import com.pahimar.ee3.reference.RenderIds;
import com.pahimar.ee3.tileentity.TileEntityAlchemySymbol;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.block.material.Material;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class BlockAlchemySymbol extends BlockEE implements ITileEntityProvider
{
public BlockAlchemySymbol()
{
super(Material.circuits);
this.setCreativeTab(null);
this.setBlockName(Names.Blocks.ALCHEMY_SYMBOL);
}
@Override
public boolean renderAsNormalBlock()
{
return false;
}
@Override
public boolean isOpaqueCube()
{
return false;
}
@Override
public int getRenderType()
{
return RenderIds.alchemySymbol;
}
/**
* Returns a new instance of a block's tile entity class. Called on placing the block.
*
* @param world
* @param metaData
*/
@Override
public TileEntity createNewTileEntity(World world, int metaData)
{
return new TileEntityAlchemySymbol();
}
}

View file

@ -1,54 +0,0 @@
package com.pahimar.ee3.block;
import com.pahimar.ee3.EquivalentExchange3;
import com.pahimar.ee3.reference.GuiId;
import com.pahimar.ee3.reference.Names;
import com.pahimar.ee3.tileentity.TileEntityTransmutationSquare;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class BlockTransmutationSquare extends BlockEE implements ITileEntityProvider
{
public BlockTransmutationSquare()
{
super(Material.circuits);
this.setCreativeTab(null);
this.setBlockName(Names.Blocks.TRANSMUTATION_SQUARE);
}
/**
* Returns a new instance of a block's tile entity class. Called on placing the block.
*
* @param world
* @param metaData
*/
@Override
public TileEntity createNewTileEntity(World world, int metaData)
{
return new TileEntityTransmutationSquare();
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9)
{
if (player.isSneaking())
{
return false;
}
else
{
if (!world.isRemote)
{
if (world.getTileEntity(x, y, z) instanceof TileEntityTransmutationSquare)
{
player.openGui(EquivalentExchange3.instance, GuiId.TRANSMUTATION_SQUARE.ordinal(), world, x, y, z);
}
}
return true;
}
}
}

View file

@ -1,43 +0,0 @@
package com.pahimar.ee3.client.gui.inventory;
import com.pahimar.ee3.inventory.ContainerTransmutationSquare;
import com.pahimar.ee3.reference.Names;
import com.pahimar.ee3.reference.Textures;
import com.pahimar.ee3.tileentity.TileEntityTransmutationSquare;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.StatCollector;
import org.lwjgl.opengl.GL11;
public class GuiTransmutationSquare extends GuiContainer
{
private TileEntityTransmutationSquare tileEntityTransmutationSquare;
public GuiTransmutationSquare(InventoryPlayer inventoryPlayer, TileEntityTransmutationSquare tileEntityTransmutationSquare)
{
super(new ContainerTransmutationSquare(inventoryPlayer, tileEntityTransmutationSquare));
this.tileEntityTransmutationSquare = tileEntityTransmutationSquare;
xSize = 246;
ySize = 223;
}
@Override
protected void drawGuiContainerForegroundLayer(int x, int y)
{
String containerName = StatCollector.translateToLocal(Names.Containers.TRANSMUTATION_SQUARE);
fontRendererObj.drawString(containerName, xSize / 2 - fontRendererObj.getStringWidth(containerName) / 2, 6, 4210752);
fontRendererObj.drawString(StatCollector.translateToLocal(Names.Containers.VANILLA_INVENTORY), 8, ySize - 96 + 2, 4210752);
}
@Override
protected void drawGuiContainerBackgroundLayer(float opacity, int x, int y)
{
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(Textures.Gui.TRANSMUTATION_SQUARE);
int xStart = (width - xSize) / 2;
int yStart = (height - ySize) / 2;
this.drawTexturedModalRect(xStart, yStart, 0, 0, xSize, ySize);
}
}

View file

@ -1,11 +1,8 @@
package com.pahimar.ee3.client.handler; package com.pahimar.ee3.client.handler;
import com.pahimar.ee3.api.EnergyValue; import com.pahimar.ee3.api.EnergyValue;
import com.pahimar.ee3.api.EnergyValueRegistryProxy;
import com.pahimar.ee3.exchange.EnergyValueRegistry; import com.pahimar.ee3.exchange.EnergyValueRegistry;
import com.pahimar.ee3.exchange.WrappedStack; import com.pahimar.ee3.exchange.WrappedStack;
import com.pahimar.ee3.reference.Settings;
import com.pahimar.ee3.skill.SkillRegistry;
import com.pahimar.ee3.util.IOwnable; import com.pahimar.ee3.util.IOwnable;
import com.pahimar.ee3.util.ItemHelper; import com.pahimar.ee3.util.ItemHelper;
import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent;
@ -52,17 +49,6 @@ public class ItemTooltipEventHandler
{ {
event.toolTip.add("No Exchange Energy value"); event.toolTip.add("No Exchange Energy value");
} }
if (Settings.Debug.debugMode)
{
event.toolTip.add("");
event.toolTip.add("[DEBUG INFORMATION]");
if (EnergyValueRegistry.getInstance().hasEnergyValue(stack))
{
event.toolTip.add(String.format("Value was: %s", EnergyValueRegistryProxy.getStageValueWasAssigned(event.itemStack)));
}
event.toolTip.add(String.format("Can Learn: %s", SkillRegistry.canLearnItemStack(event.itemStack)));
}
} }
if (event.itemStack.getItem() instanceof IOwnable) if (event.itemStack.getItem() instanceof IOwnable)

View file

@ -591,29 +591,6 @@ public class EnergyValueRegistry implements INBTTaggable
return stacksInRange; return stacksInRange;
} }
public String getStageValueWasAssigned(Object object)
{
if (WrappedStack.canBeWrapped(object))
{
WrappedStack wrappedStack = new WrappedStack(object);
if (preAssignedMappings.keySet().contains(wrappedStack))
{
return "Pre Assigned";
}
else if (postAssignedMappings.keySet().contains(wrappedStack))
{
return "Post Assigned";
}
else if (hasEnergyValue(object))
{
return "Computed";
}
}
return "No Value Assigned";
}
@Override @Override
public void readFromNBT(NBTTagCompound nbtTagCompound) public void readFromNBT(NBTTagCompound nbtTagCompound)
{ {

View file

@ -32,7 +32,6 @@ public class ConfigurationHandler
Settings.Transmutation.maxKnowledgeTier = configuration.getInt(Messages.Configuration.TRANSMUTATION_KNOWLEDGE_MAX_TIER, Messages.Configuration.CATEGORY_TRANSMUTATION, 0, 0, Short.MAX_VALUE, StatCollector.translateToLocal(Messages.Configuration.TRANSMUTATION_KNOWLEDGE_MAX_TIER_COMMENT), Messages.Configuration.TRANSMUTATION_KNOWLEDGE_MAX_TIER_LABEL); Settings.Transmutation.maxKnowledgeTier = configuration.getInt(Messages.Configuration.TRANSMUTATION_KNOWLEDGE_MAX_TIER, Messages.Configuration.CATEGORY_TRANSMUTATION, 0, 0, Short.MAX_VALUE, StatCollector.translateToLocal(Messages.Configuration.TRANSMUTATION_KNOWLEDGE_MAX_TIER_COMMENT), Messages.Configuration.TRANSMUTATION_KNOWLEDGE_MAX_TIER_LABEL);
Settings.Transmutation.useTemplateFile = configuration.getBoolean(Messages.Configuration.TRANSMUTATION_KNOWLEDGE_TEMPLATE, Messages.Configuration.CATEGORY_TRANSMUTATION, true, StatCollector.translateToLocal(Messages.Configuration.TRANSMUTATION_KNOWLEDGE_TEMPLATE_COMMENT), Messages.Configuration.TRANSMUTATION_KNOWLEDGE_TEMPLATE_LABEL); Settings.Transmutation.useTemplateFile = configuration.getBoolean(Messages.Configuration.TRANSMUTATION_KNOWLEDGE_TEMPLATE, Messages.Configuration.CATEGORY_TRANSMUTATION, true, StatCollector.translateToLocal(Messages.Configuration.TRANSMUTATION_KNOWLEDGE_TEMPLATE_COMMENT), Messages.Configuration.TRANSMUTATION_KNOWLEDGE_TEMPLATE_LABEL);
Settings.Sounds.soundMode = ConfigurationHelper.getString(configuration, Messages.Configuration.SOUND_MODE, Configuration.CATEGORY_GENERAL, "All", StatCollector.translateToLocal(Messages.Configuration.SOUND_MODE_COMMENT), new String[]{"All", "Self", "None"}, Messages.Configuration.SOUND_MODE_LABEL); Settings.Sounds.soundMode = ConfigurationHelper.getString(configuration, Messages.Configuration.SOUND_MODE, Configuration.CATEGORY_GENERAL, "All", StatCollector.translateToLocal(Messages.Configuration.SOUND_MODE_COMMENT), new String[]{"All", "Self", "None"}, Messages.Configuration.SOUND_MODE_LABEL);
Settings.Debug.debugMode = configuration.getBoolean(Messages.Configuration.DEBUG_MODE, Messages.Configuration.CATEGORY_DEBUG, false, StatCollector.translateToLocal(Messages.Configuration.DEBUG_MODE_COMMENT), Messages.Configuration.DEBUG_MODE_LABEL);
if (configuration.hasChanged()) if (configuration.hasChanged())
{ {

View file

@ -52,11 +52,6 @@ public class GuiHandler implements IGuiHandler
TileEntityAugmentationTable tileEntityAugmentationTable = (TileEntityAugmentationTable) world.getTileEntity(x, y, z); TileEntityAugmentationTable tileEntityAugmentationTable = (TileEntityAugmentationTable) world.getTileEntity(x, y, z);
return new ContainerAugmentationTable(entityPlayer.inventory, tileEntityAugmentationTable); return new ContainerAugmentationTable(entityPlayer.inventory, tileEntityAugmentationTable);
} }
else if (id == GuiId.TRANSMUTATION_SQUARE.ordinal())
{
TileEntityTransmutationSquare tileEntityTransmutationSquare = (TileEntityTransmutationSquare) world.getTileEntity(x, y, z);
return new ContainerTransmutationSquare(entityPlayer.inventory, tileEntityTransmutationSquare);
}
return null; return null;
} }
@ -103,11 +98,6 @@ public class GuiHandler implements IGuiHandler
TileEntityAugmentationTable tileEntityAugmentationTable = (TileEntityAugmentationTable) world.getTileEntity(x, y, z); TileEntityAugmentationTable tileEntityAugmentationTable = (TileEntityAugmentationTable) world.getTileEntity(x, y, z);
return new GuiAugmentationTable(entityPlayer.inventory, tileEntityAugmentationTable); return new GuiAugmentationTable(entityPlayer.inventory, tileEntityAugmentationTable);
} }
else if (id == GuiId.TRANSMUTATION_SQUARE.ordinal())
{
TileEntityTransmutationSquare tileEntityTransmutationSquare = (TileEntityTransmutationSquare) world.getTileEntity(x, y, z);
return new GuiTransmutationSquare(entityPlayer.inventory, tileEntityTransmutationSquare);
}
return null; return null;
} }

View file

@ -18,7 +18,7 @@ public class ModBlocks
public static final BlockEE glassBell = new BlockGlassBell(); public static final BlockEE glassBell = new BlockGlassBell();
public static final BlockEE researchStation = new BlockResearchStation(); public static final BlockEE researchStation = new BlockResearchStation();
public static final BlockEE augmentationTable = new BlockAugmentationTable(); public static final BlockEE augmentationTable = new BlockAugmentationTable();
public static final BlockEE transmutationSquare = new BlockTransmutationSquare(); public static final BlockEE alchemySymbol = new BlockAlchemySymbol();
public static void init() public static void init()
{ {
@ -30,6 +30,6 @@ public class ModBlocks
GameRegistry.registerBlock(alchemicalChest, ItemBlockAlchemicalChest.class, Names.Blocks.ALCHEMICAL_CHEST); GameRegistry.registerBlock(alchemicalChest, ItemBlockAlchemicalChest.class, Names.Blocks.ALCHEMICAL_CHEST);
GameRegistry.registerBlock(chalkBlock, Names.Blocks.CHALK); GameRegistry.registerBlock(chalkBlock, Names.Blocks.CHALK);
GameRegistry.registerBlock(alchemicalFuelBlock, ItemBlockAlchemicalFuel.class, Names.Blocks.ALCHEMICAL_FUEL); GameRegistry.registerBlock(alchemicalFuelBlock, ItemBlockAlchemicalFuel.class, Names.Blocks.ALCHEMICAL_FUEL);
GameRegistry.registerBlock(transmutationSquare, Names.Blocks.TRANSMUTATION_SQUARE); GameRegistry.registerBlock(alchemySymbol, Names.Blocks.ALCHEMY_SYMBOL);
} }
} }

View file

@ -1,14 +0,0 @@
package com.pahimar.ee3.inventory;
import com.pahimar.ee3.tileentity.TileEntityTransmutationSquare;
import net.minecraft.entity.player.InventoryPlayer;
public class ContainerTransmutationSquare extends ContainerEE
{
private TileEntityTransmutationSquare tileEntityTransmutationSquare;
public ContainerTransmutationSquare(InventoryPlayer inventoryPlayer, TileEntityTransmutationSquare tileEntityTransmutationSquare)
{
this.tileEntityTransmutationSquare = tileEntityTransmutationSquare;
}
}

View file

@ -52,6 +52,7 @@ public class ClientProxy extends CommonProxy
RenderIds.glassBell = RenderingRegistry.getNextAvailableRenderId(); RenderIds.glassBell = RenderingRegistry.getNextAvailableRenderId();
RenderIds.researchStation = RenderingRegistry.getNextAvailableRenderId(); RenderIds.researchStation = RenderingRegistry.getNextAvailableRenderId();
RenderIds.augmentationTable = RenderingRegistry.getNextAvailableRenderId(); RenderIds.augmentationTable = RenderingRegistry.getNextAvailableRenderId();
RenderIds.alchemySymbol = RenderingRegistry.getNextAvailableRenderId();
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.alchemicalChest), new ItemRendererAlchemicalChest()); MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.alchemicalChest), new ItemRendererAlchemicalChest());
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.aludel), new ItemRendererAludel()); MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.aludel), new ItemRendererAludel());

View file

@ -36,6 +36,6 @@ public abstract class CommonProxy implements IProxy
GameRegistry.registerTileEntityWithAlternatives(TileEntityGlassBell.class, Names.Blocks.GLASS_BELL, "tile." + Names.Blocks.GLASS_BELL); GameRegistry.registerTileEntityWithAlternatives(TileEntityGlassBell.class, Names.Blocks.GLASS_BELL, "tile." + Names.Blocks.GLASS_BELL);
GameRegistry.registerTileEntity(TileEntityResearchStation.class, Names.Blocks.RESEARCH_STATION); GameRegistry.registerTileEntity(TileEntityResearchStation.class, Names.Blocks.RESEARCH_STATION);
GameRegistry.registerTileEntity(TileEntityAugmentationTable.class, Names.Blocks.AUGMENTATION_TABLE); GameRegistry.registerTileEntity(TileEntityAugmentationTable.class, Names.Blocks.AUGMENTATION_TABLE);
GameRegistry.registerTileEntity(TileEntityTransmutationSquare.class, Names.Blocks.TRANSMUTATION_SQUARE); GameRegistry.registerTileEntity(TileEntityAlchemySymbol.class, Names.Blocks.ALCHEMY_SYMBOL);
} }
} }

View file

@ -11,12 +11,6 @@ public final class Messages
public static final class Configuration public static final class Configuration
{ {
public static final String CATEGORY_DEBUG = "general.debug";
public static final String DEBUG_MODE = "debugMode";
public static final String DEBUG_MODE_LABEL = "general.debug.mode.label";
public static final String DEBUG_MODE_COMMENT = "general.debug.mode.comment";
public static final String GENERAL_SYNC_THRESHOLD = "sync.threshold"; public static final String GENERAL_SYNC_THRESHOLD = "sync.threshold";
public static final String GENERAL_SYNC_THRESHOLD_LABEL = "general.sync.threshold.label"; public static final String GENERAL_SYNC_THRESHOLD_LABEL = "general.sync.threshold.label";
public static final String GENERAL_SYNC_THRESHOLD_COMMENT = "general.sync.threshold.comment"; public static final String GENERAL_SYNC_THRESHOLD_COMMENT = "general.sync.threshold.comment";

View file

@ -13,6 +13,7 @@ public class Names
public static final String RESEARCH_STATION = "researchStation"; public static final String RESEARCH_STATION = "researchStation";
public static final String AUGMENTATION_TABLE = "augmentationTable"; public static final String AUGMENTATION_TABLE = "augmentationTable";
public static final String TRANSMUTATION_SQUARE = "transmutationSquare"; public static final String TRANSMUTATION_SQUARE = "transmutationSquare";
public static final String ALCHEMY_SYMBOL = "alchemySymbol";
} }
public static final class Items public static final class Items

View file

@ -8,4 +8,5 @@ public class RenderIds
public static int glassBell; public static int glassBell;
public static int researchStation; public static int researchStation;
public static int augmentationTable; public static int augmentationTable;
public static int alchemySymbol;
} }

View file

@ -2,11 +2,6 @@ package com.pahimar.ee3.reference;
public class Settings public class Settings
{ {
public static class Debug
{
public static boolean debugMode;
}
public static class General public static class General
{ {
public static int syncThreshold; public static int syncThreshold;

View file

@ -1,6 +1,6 @@
package com.pahimar.ee3.tileentity; package com.pahimar.ee3.tileentity;
public class TileEntityAlchemySquare extends TileEntityEE public class TileEntityAlchemySymbol extends TileEntityEE
{ {
/** /**
* Shape (3 bits): * Shape (3 bits):

View file

@ -1,215 +0,0 @@
package com.pahimar.ee3.tileentity;
import com.pahimar.ee3.api.EnergyValue;
import com.pahimar.ee3.reference.Names;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
public class TileEntityTransmutationSquare extends TileEntityEE implements IInventory
{
public static final int INVENTORY_SIZE = 9;
private ItemStack[] inventory;
private EnergyValue currentEnergyValue;
private int tier;
public TileEntityTransmutationSquare()
{
inventory = new ItemStack[INVENTORY_SIZE];
}
/**
* Returns the number of slots in the inventory.
*/
@Override
public int getSizeInventory()
{
return inventory.length;
}
/**
* Returns the stack in slot i
*
* @param slotIndex
*/
@Override
public ItemStack getStackInSlot(int slotIndex)
{
return inventory[slotIndex];
}
/**
* Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a
* new stack.
*
* @param slotIndex
* @param decrementAmount
*/
@Override
public ItemStack decrStackSize(int slotIndex, int decrementAmount)
{
ItemStack itemStack = getStackInSlot(slotIndex);
if (itemStack != null)
{
if (itemStack.stackSize <= decrementAmount)
{
setInventorySlotContents(slotIndex, null);
}
else
{
itemStack = itemStack.splitStack(decrementAmount);
if (itemStack.stackSize == 0)
{
setInventorySlotContents(slotIndex, null);
}
}
}
return itemStack;
}
/**
* When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem -
* like when you close a workbench GUI.
*
* @param slotIndex
*/
@Override
public ItemStack getStackInSlotOnClosing(int slotIndex)
{
ItemStack itemStack = getStackInSlot(slotIndex);
if (itemStack != null)
{
setInventorySlotContents(slotIndex, null);
}
return itemStack;
}
/**
* Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
*
* @param slotIndex
* @param itemStack
*/
@Override
public void setInventorySlotContents(int slotIndex, ItemStack itemStack)
{
inventory[slotIndex] = itemStack;
if (itemStack != null && itemStack.stackSize > getInventoryStackLimit())
{
itemStack.stackSize = getInventoryStackLimit();
}
}
/**
* Returns the name of the inventory
*/
@Override
public String getInventoryName()
{
return this.hasCustomName() ? this.getCustomName() : Names.Containers.TRANSMUTATION_SQUARE;
}
/**
* Returns if the inventory is named
*/
@Override
public boolean hasCustomInventoryName()
{
return this.hasCustomName();
}
/**
* Returns the maximum stack size for a inventory slot.
*/
@Override
public int getInventoryStackLimit()
{
return 64;
}
/**
* Do not make give this method the name canInteractWith because it clashes with Container
*
* @param entityPlayer
*/
@Override
public boolean isUseableByPlayer(EntityPlayer entityPlayer)
{
return true;
}
@Override
public void openInventory()
{
// NOOP
}
@Override
public void closeInventory()
{
// NOOP
}
/**
* Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot.
*
* @param slotIndex
* @param itemStack
*/
@Override
public boolean isItemValidForSlot(int slotIndex, ItemStack itemStack)
{
return false;
}
@Override
public void writeToNBT(NBTTagCompound nbtTagCompound)
{
super.writeToNBT(nbtTagCompound);
// Write the ItemStacks in the inventory to NBT
NBTTagList tagList = new NBTTagList();
for (int currentIndex = 0; currentIndex < inventory.length; ++currentIndex)
{
if (inventory[currentIndex] != null)
{
NBTTagCompound tagCompound = new NBTTagCompound();
tagCompound.setByte("Slot", (byte) currentIndex);
inventory[currentIndex].writeToNBT(tagCompound);
tagList.appendTag(tagCompound);
}
}
nbtTagCompound.setTag(Names.NBT.ITEMS, tagList);
nbtTagCompound.setInteger("tier", tier);
}
@Override
public void readFromNBT(NBTTagCompound nbtTagCompound)
{
super.readFromNBT(nbtTagCompound);
// Read in the ItemStacks in the inventory from NBT
NBTTagList tagList = nbtTagCompound.getTagList(Names.NBT.ITEMS, 10);
inventory = new ItemStack[this.getSizeInventory()];
for (int i = 0; i < tagList.tagCount(); ++i)
{
NBTTagCompound tagCompound = tagList.getCompoundTagAt(i);
byte slotIndex = tagCompound.getByte("Slot");
if (slotIndex >= 0 && slotIndex < inventory.length)
{
inventory[slotIndex] = ItemStack.loadItemStackFromNBT(tagCompound);
}
}
tier = nbtTagCompound.getInteger("tier");
}
@Override
public void updateEntity()
{
}
}

View file

@ -15,10 +15,6 @@ general.transmutation.knowledge.template.comment=If true, new player's will have
general.sound.soundMode.label=Sounds general.sound.soundMode.label=Sounds
general.sound.soundMode.comment='All' plays mod sounds from all players, 'Self' only plays mod sounds from you, and 'None' plays no mod sounds general.sound.soundMode.comment='All' plays mod sounds from all players, 'Self' only plays mod sounds from you, and 'None' plays no mod sounds
general.debug=Debug Settings
general.debug.mode.label=Debug Mode Enabled
general.debug.mode.comment=Toggles whether or not debug mode is enabled (Note: This is primarily for modders testing mod interaction with Equivalent Exchange 3)
# Keys # Keys
key.categories.ee3=Equivalent Exchange 3 key.categories.ee3=Equivalent Exchange 3
key.charge=Charge key.charge=Charge