More cleanup.
This commit is contained in:
Chris committed 2016-01-05 22:22:42 -05:00
1 parent adff438574
commit b215a36649
47 files changed
+508 -428

No files matched your search

+1
View File
@@ -1,6 +1,7 @@
01/05/2016 0.10.0.0 - Beta
Added recipe and Thaumonomicon entry for DPE.
Reduced client packet overhead.
More cleanup.
01/04/2016 0.10.0.0 - Beta
Essentia terminal player different sounds depending on item.
@@ -14,6 +14,8 @@ public abstract class IThEItems
public IThEItemDescription EssentiaCell_64k;
public IThEItemDescription EssentiaCell_Creative;
public IThEItemDescription EssentiaCell_Casing;
public IThEItemDescription EssentiaStorageComponent_16k;
@@ -23,7 +23,7 @@ import thaumicenergistics.client.textures.GuiTextureManager;
import thaumicenergistics.common.container.ContainerPartArcaneCraftingTerminal;
import thaumicenergistics.common.container.ContainerPartArcaneCraftingTerminal.ArcaneCrafingCost;
import thaumicenergistics.common.network.packet.server.Packet_S_ArcaneCraftingTerminal;
import thaumicenergistics.common.parts.AEPartArcaneCraftingTerminal;
import thaumicenergistics.common.parts.PartArcaneCraftingTerminal;
import thaumicenergistics.common.registries.ThEStrings;
import thaumicenergistics.common.utils.ThEUtils;
import thaumicenergistics.integration.tc.MEItemAspectBridgeContainer;
@@ -166,7 +166,7 @@ public class GuiArcaneCraftingTerminal
*/
private ArrayList<String> cachedItemTooltip = new ArrayList<String>();
public GuiArcaneCraftingTerminal( final AEPartArcaneCraftingTerminal part, final EntityPlayer player )
public GuiArcaneCraftingTerminal( final PartArcaneCraftingTerminal part, final EntityPlayer player )
{
// Call super
super( new ContainerPartArcaneCraftingTerminal( part, player ) );
@@ -31,7 +31,7 @@ import thaumicenergistics.common.container.ContainerEssentiaTerminal;
import thaumicenergistics.common.container.ContainerWirelessEssentiaTerminal;
import thaumicenergistics.common.inventory.HandlerWirelessEssentiaTerminal;
import thaumicenergistics.common.network.packet.server.Packet_S_EssentiaCellTerminal;
import thaumicenergistics.common.parts.AEPartEssentiaTerminal;
import thaumicenergistics.common.parts.PartEssentiaTerminal;
import thaumicenergistics.common.registries.ThEStrings;
import thaumicenergistics.common.storage.AspectStackComparator;
import thaumicenergistics.common.storage.AspectStackComparator.AspectStackComparatorMode;
@@ -234,7 +234,7 @@ public class GuiEssentiaCellTerminal
* @param player
* @return
*/
public static GuiEssentiaCellTerminal NewEssentiaTerminalGui( final AEPartEssentiaTerminal terminal, final EntityPlayer player )
public static GuiEssentiaCellTerminal NewEssentiaTerminalGui( final PartEssentiaTerminal terminal, final EntityPlayer player )
{
return new GuiEssentiaCellTerminal( player, new ContainerEssentiaTerminal( terminal, player ),
ThEStrings.Part_EssentiaTerminal.getLocalized() );
@@ -16,9 +16,9 @@ import thaumicenergistics.client.gui.widget.WidgetAspectSlot;
import thaumicenergistics.client.textures.GuiTextureManager;
import thaumicenergistics.common.container.ContainerPartEssentiaIOBus;
import thaumicenergistics.common.network.packet.server.Packet_S_EssentiaIOBus;
import thaumicenergistics.common.parts.AEPartEssentiaExportBus;
import thaumicenergistics.common.parts.AEPartEssentiaImportBus;
import thaumicenergistics.common.parts.AbstractAEPartEssentiaIOBus;
import thaumicenergistics.common.parts.PartEssentiaExportBus;
import thaumicenergistics.common.parts.PartEssentiaImportBus;
import thaumicenergistics.common.parts.ThEPartEssentiaIOBus_Base;
import thaumicenergistics.common.registries.AEPartsEnum;
import thaumicenergistics.integration.tc.EssentiaItemContainerHelper;
import appeng.api.config.RedstoneMode;
@@ -108,7 +108,7 @@ public class GuiEssentiaIO
/**
* The part associated with this gui.
*/
private AbstractAEPartEssentiaIOBus part;
private ThEPartEssentiaIOBus_Base part;
/**
* The player viewing this bus gui.
@@ -161,7 +161,7 @@ public class GuiEssentiaIO
* @param partBus
* @param player
*/
public GuiEssentiaIO( final AbstractAEPartEssentiaIOBus partBus, final EntityPlayer player )
public GuiEssentiaIO( final ThEPartEssentiaIOBus_Base partBus, final EntityPlayer player )
{
// Call super
super( new ContainerPartEssentiaIOBus( partBus, player ) );
@@ -182,12 +182,12 @@ public class GuiEssentiaIO
this.ySize = GuiEssentiaIO.GUI_HEIGHT;
// Set the title
if( partBus instanceof AEPartEssentiaImportBus )
if( partBus instanceof PartEssentiaImportBus )
{
// Import
this.guiTitle = AEPartsEnum.EssentiaImportBus.getLocalizedName();
}
else if( partBus instanceof AEPartEssentiaExportBus )
else if( partBus instanceof PartEssentiaExportBus )
{
// Export
this.guiTitle = AEPartsEnum.EssentiaExportBus.getLocalizedName();
@@ -320,9 +320,9 @@ public class GuiEssentiaIO
// Void button?
else if( button.id == GuiEssentiaIO.ALLOW_VOID_BUTTON_ID )
{
if( this.part instanceof AEPartEssentiaExportBus )
if( this.part instanceof PartEssentiaExportBus )
{
Packet_S_EssentiaIOBus.sendVoidModeChange( this.player, (AEPartEssentiaExportBus)this.part );
Packet_S_EssentiaIOBus.sendVoidModeChange( this.player, (PartEssentiaExportBus)this.part );
}
}
}
@@ -367,7 +367,7 @@ public class GuiEssentiaIO
GuiEssentiaIO.REDSTONE_CONTROL_BUTTON_SIZE, GuiEssentiaIO.REDSTONE_CONTROL_BUTTON_SIZE, this.redstoneMode, false );
// Create the allow void button if export bus
if( this.part instanceof AEPartEssentiaExportBus )
if( this.part instanceof PartEssentiaExportBus )
{
this.voidModeButton = new GuiButtonAllowVoid( GuiEssentiaIO.ALLOW_VOID_BUTTON_ID, this.guiLeft + GuiEssentiaIO.ALLOW_VOID_BUTTON_POS_X,
this.guiTop + GuiEssentiaIO.ALLOW_VOID_BUTTON_POS_Y );
@@ -16,7 +16,7 @@ import thaumicenergistics.client.gui.widget.WidgetAspectSlot;
import thaumicenergistics.client.textures.GuiTextureManager;
import thaumicenergistics.common.container.ContainerPartEssentiaLevelEmitter;
import thaumicenergistics.common.network.packet.server.Packet_S_EssentiaEmitter;
import thaumicenergistics.common.parts.AEPartEssentiaLevelEmitter;
import thaumicenergistics.common.parts.PartEssentiaLevelEmitter;
import thaumicenergistics.common.registries.AEPartsEnum;
import thaumicenergistics.integration.tc.EssentiaItemContainerHelper;
import appeng.api.config.RedstoneMode;
@@ -167,7 +167,7 @@ public class GuiEssentiaLevelEmitter
/**
* AE part associated with the gui.
*/
private AEPartEssentiaLevelEmitter part;
private PartEssentiaLevelEmitter part;
/**
* Player viewing the gui.
@@ -187,7 +187,7 @@ public class GuiEssentiaLevelEmitter
* @param player
* Player viewing the gui.
*/
public GuiEssentiaLevelEmitter( final AEPartEssentiaLevelEmitter part, final EntityPlayer player )
public GuiEssentiaLevelEmitter( final PartEssentiaLevelEmitter part, final EntityPlayer player )
{
// Call super
super( new ContainerPartEssentiaLevelEmitter( part, player ) );
@@ -21,7 +21,7 @@ import thaumicenergistics.common.ThEGuiHandler;
import thaumicenergistics.common.container.ContainerPartEssentiaStorageBus;
import thaumicenergistics.common.network.packet.server.Packet_S_ChangeGui;
import thaumicenergistics.common.network.packet.server.Packet_S_EssentiaStorageBus;
import thaumicenergistics.common.parts.AEPartEssentiaStorageBus;
import thaumicenergistics.common.parts.PartEssentiaStorageBus;
import thaumicenergistics.common.registries.AEPartsEnum;
import thaumicenergistics.integration.tc.EssentiaItemContainerHelper;
import cpw.mods.fml.relauncher.Side;
@@ -122,7 +122,7 @@ public class GuiEssentiaStorageBus
/**
* Storage bus associated with this gui
*/
private AEPartEssentiaStorageBus storageBus;
private PartEssentiaStorageBus storageBus;
/**
* Title of the gui
@@ -144,7 +144,7 @@ public class GuiEssentiaStorageBus
* @param container
* The inventory container.
*/
public GuiEssentiaStorageBus( final AEPartEssentiaStorageBus storageBus, final EntityPlayer player )
public GuiEssentiaStorageBus( final PartEssentiaStorageBus storageBus, final EntityPlayer player )
{
// Call super
super( new ContainerPartEssentiaStorageBus( storageBus, player ) );
@@ -14,7 +14,7 @@ import thaumicenergistics.client.textures.GuiTextureManager;
import thaumicenergistics.common.container.ContainerPriority;
import thaumicenergistics.common.network.packet.server.Packet_S_ChangeGui;
import thaumicenergistics.common.network.packet.server.Packet_S_Priority;
import thaumicenergistics.common.parts.AbstractAEPartBase;
import thaumicenergistics.common.parts.ThEPartBase;
import appeng.core.localization.GuiText;
import appeng.helpers.IPriorityHost;
import cpw.mods.fml.relauncher.Side;
@@ -185,7 +185,7 @@ public class GuiPriority
/**
* The part we are adjusting the priority of
*/
private final AbstractAEPartBase part;
private final ThEPartBase part;
/**
* The player viewing the gui.
@@ -214,7 +214,7 @@ public class GuiPriority
super( new ContainerPriority( host, player ) );
// Get the part
this.part = (AbstractAEPartBase)host;
this.part = (ThEPartBase)host;
// Set the player
this.player = player;
@@ -8,7 +8,7 @@ import thaumicenergistics.api.gui.ICraftingIssuerContainer;
import thaumicenergistics.client.gui.*;
import thaumicenergistics.common.container.*;
import thaumicenergistics.common.inventory.HandlerWirelessEssentiaTerminal;
import thaumicenergistics.common.parts.AbstractAEPartBase;
import thaumicenergistics.common.parts.ThEPartBase;
import appeng.api.parts.IPart;
import appeng.api.parts.IPartHost;
import appeng.container.AEBaseContainer;
@@ -174,7 +174,7 @@ public class ThEGuiHandler
final int z, final boolean isServerSide )
{
// Get the part
AbstractAEPartBase part = (AbstractAEPartBase)ThEGuiHandler.getPart( tileSide, world, x, y, z );
ThEPartBase part = (ThEPartBase)ThEGuiHandler.getPart( tileSide, world, x, y, z );
// Ensure we got the part
if( part == null )
@@ -228,7 +228,7 @@ public class ThEGuiHandler
* @param y
* @param z
*/
public static void launchGui( final AbstractAEPartBase part, final EntityPlayer player, final World world, final int x, final int y, final int z )
public static void launchGui( final ThEPartBase part, final EntityPlayer player, final World world, final int x, final int y, final int z )
{
// Ensure the player is allowed to open the gui
if( part.doesPlayerHavePermissionToOpenGui( player ) )
@@ -8,7 +8,7 @@ import thaumicenergistics.common.ThEGuiHandler;
import thaumicenergistics.common.items.ItemCraftingAspect;
import thaumicenergistics.common.network.packet.client.Packet_C_EssentiaCellTerminal;
import thaumicenergistics.common.network.packet.server.Packet_S_EssentiaCellTerminal;
import thaumicenergistics.common.parts.AEPartEssentiaTerminal;
import thaumicenergistics.common.parts.PartEssentiaTerminal;
import thaumicenergistics.common.storage.AspectStackComparator.AspectStackComparatorMode;
import thaumicenergistics.common.utils.EffectiveSide;
import appeng.api.AEApi;
@@ -31,7 +31,7 @@ public class ContainerEssentiaTerminal
/**
* The terminal this is associated with.
*/
private AEPartEssentiaTerminal terminal = null;
private PartEssentiaTerminal terminal = null;
/**
* Network source representing the player who is interacting with the
@@ -47,7 +47,7 @@ public class ContainerEssentiaTerminal
* @param player
* Player that owns this container.
*/
public ContainerEssentiaTerminal( final AEPartEssentiaTerminal terminal, final EntityPlayer player )
public ContainerEssentiaTerminal( final PartEssentiaTerminal terminal, final EntityPlayer player )
{
// Call the super
super( player );
@@ -26,7 +26,7 @@ import thaumicenergistics.common.container.slot.SlotArmor;
import thaumicenergistics.common.container.slot.SlotRestrictive;
import thaumicenergistics.common.network.packet.client.Packet_C_ArcaneCraftingTerminal;
import thaumicenergistics.common.network.packet.client.Packet_C_Sync;
import thaumicenergistics.common.parts.AEPartArcaneCraftingTerminal;
import thaumicenergistics.common.parts.PartArcaneCraftingTerminal;
import thaumicenergistics.common.utils.EffectiveSide;
import thaumicenergistics.common.utils.ThEUtils;
import thaumicenergistics.integration.tc.ArcaneRecipeHelper;
@@ -133,7 +133,7 @@ public class ContainerPartArcaneCraftingTerminal
/**
* The arcane crafting terminal associated with the container.
*/
private AEPartArcaneCraftingTerminal arcaneCraftingTerminalPart;
private PartArcaneCraftingTerminal arcaneCraftingTerminalPart;
/**
* The player associated with this container.
@@ -192,7 +192,7 @@ public class ContainerPartArcaneCraftingTerminal
* @param terminal
* @param player
*/
public ContainerPartArcaneCraftingTerminal( final AEPartArcaneCraftingTerminal terminal, final EntityPlayer player )
public ContainerPartArcaneCraftingTerminal( final PartArcaneCraftingTerminal terminal, final EntityPlayer player )
{
// Set the part
this.arcaneCraftingTerminalPart = terminal;
@@ -240,7 +240,7 @@ public class ContainerPartArcaneCraftingTerminal
// Create the result slot
SlotArcaneCraftingResult resultSlot = new SlotArcaneCraftingResult( player, this, terminal, terminal,
AEPartArcaneCraftingTerminal.RESULT_SLOT_INDEX, ContainerPartArcaneCraftingTerminal.RESULT_SLOT_X_POS,
PartArcaneCraftingTerminal.RESULT_SLOT_INDEX, ContainerPartArcaneCraftingTerminal.RESULT_SLOT_X_POS,
ContainerPartArcaneCraftingTerminal.RESULT_SLOT_Y_POS );
// Add the result slot
@@ -250,7 +250,7 @@ public class ContainerPartArcaneCraftingTerminal
this.resultSlotNumber = resultSlot.slotNumber;
// Create the wand slot
SlotRestrictive wandSlot = new SlotRestrictive( terminal, AEPartArcaneCraftingTerminal.WAND_SLOT_INDEX,
SlotRestrictive wandSlot = new SlotRestrictive( terminal, PartArcaneCraftingTerminal.WAND_SLOT_INDEX,
ContainerPartArcaneCraftingTerminal.WAND_SLOT_XPOS, ContainerPartArcaneCraftingTerminal.WAND_SLOT_YPOS );
// Add the wand slot
@@ -261,10 +261,10 @@ public class ContainerPartArcaneCraftingTerminal
// Create the view slots
SlotRestrictive viewSlot = null;
for( int viewSlotID = AEPartArcaneCraftingTerminal.VIEW_SLOT_MIN; viewSlotID <= AEPartArcaneCraftingTerminal.VIEW_SLOT_MAX; viewSlotID++ )
for( int viewSlotID = PartArcaneCraftingTerminal.VIEW_SLOT_MIN; viewSlotID <= PartArcaneCraftingTerminal.VIEW_SLOT_MAX; viewSlotID++ )
{
// Calculate the y position
int row = viewSlotID - AEPartArcaneCraftingTerminal.VIEW_SLOT_MIN;
int row = viewSlotID - PartArcaneCraftingTerminal.VIEW_SLOT_MIN;
int yPos = ContainerPartArcaneCraftingTerminal.VIEW_SLOT_YPOS + ( row * ContainerWithPlayerInventory.SLOT_SIZE );
// Create the slot
@@ -293,7 +293,7 @@ public class ContainerPartArcaneCraftingTerminal
int yPos = ContainerPartArcaneCraftingTerminal.ARMOR_SLOT_Y_POS + ( ContainerWithPlayerInventory.SLOT_SIZE * armorIndex );
// Create the slot
SlotArmor armorSlot = new SlotArmor( terminal, AEPartArcaneCraftingTerminal.ARMOR_SLOT_MIN + armorIndex,
SlotArmor armorSlot = new SlotArmor( terminal, PartArcaneCraftingTerminal.ARMOR_SLOT_MIN + armorIndex,
ContainerPartArcaneCraftingTerminal.ARMOR_SLOT_X_POS, yPos, armorIndex, false );
// Add to container
@@ -664,7 +664,7 @@ public class ContainerPartArcaneCraftingTerminal
private boolean mergeWithViewCells( final ItemStack itemStack )
{
// Ensure the item a view cell
if( !this.arcaneCraftingTerminalPart.isItemValidForSlot( AEPartArcaneCraftingTerminal.VIEW_SLOT_MIN, itemStack ) )
if( !this.arcaneCraftingTerminalPart.isItemValidForSlot( PartArcaneCraftingTerminal.VIEW_SLOT_MIN, itemStack ) )
{
return false;
}
@@ -1346,7 +1346,7 @@ public class ContainerPartArcaneCraftingTerminal
resultSlot.setWand( this.wand );
// Set the result
this.arcaneCraftingTerminalPart.setInventorySlotContentsWithoutNotify( AEPartArcaneCraftingTerminal.RESULT_SLOT_INDEX, craftResult );
this.arcaneCraftingTerminalPart.setInventorySlotContentsWithoutNotify( PartArcaneCraftingTerminal.RESULT_SLOT_INDEX, craftResult );
}
@@ -7,7 +7,7 @@ import net.minecraft.item.ItemStack;
import thaumcraft.api.aspects.Aspect;
import thaumicenergistics.common.network.packet.client.Packet_C_AspectSlot;
import thaumicenergistics.common.network.packet.client.Packet_C_EssentiaIOBus;
import thaumicenergistics.common.parts.AbstractAEPartEssentiaIOBus;
import thaumicenergistics.common.parts.ThEPartEssentiaIOBus_Base;
import appeng.api.config.RedstoneMode;
/**
@@ -47,7 +47,7 @@ public class ContainerPartEssentiaIOBus
/**
* The part associated with this container
*/
private AbstractAEPartEssentiaIOBus part;
private ThEPartEssentiaIOBus_Base part;
/**
* Player associated with the container
@@ -62,7 +62,7 @@ public class ContainerPartEssentiaIOBus
* @param player
* The owner of the container.
*/
public ContainerPartEssentiaIOBus( final AbstractAEPartEssentiaIOBus part, final EntityPlayer player )
public ContainerPartEssentiaIOBus( final ThEPartEssentiaIOBus_Base part, final EntityPlayer player )
{
// Set the part
this.part = part;
@@ -3,7 +3,7 @@ package thaumicenergistics.common.container;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import thaumicenergistics.common.parts.AEPartEssentiaLevelEmitter;
import thaumicenergistics.common.parts.PartEssentiaLevelEmitter;
/**
* Inventory container for essentia emitter.
@@ -27,7 +27,7 @@ public class ContainerPartEssentiaLevelEmitter
/**
* The AE part associated with this container.
*/
private AEPartEssentiaLevelEmitter part;
private PartEssentiaLevelEmitter part;
/**
* Create the container.
@@ -35,7 +35,7 @@ public class ContainerPartEssentiaLevelEmitter
* @param player
* The owner of this container.
*/
public ContainerPartEssentiaLevelEmitter( final AEPartEssentiaLevelEmitter part, final EntityPlayer player )
public ContainerPartEssentiaLevelEmitter( final PartEssentiaLevelEmitter part, final EntityPlayer player )
{
// Set the part
this.part = part;
@@ -6,7 +6,7 @@ import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import thaumcraft.api.aspects.Aspect;
import thaumicenergistics.common.network.packet.client.Packet_C_AspectSlot;
import thaumicenergistics.common.parts.AEPartEssentiaStorageBus;
import thaumicenergistics.common.parts.PartEssentiaStorageBus;
public class ContainerPartEssentiaStorageBus
extends ContainerWithNetworkTool
@@ -31,11 +31,11 @@ public class ContainerPartEssentiaStorageBus
*/
private static int HOTBAR_INV_POSITION_Y = 160;
private AEPartEssentiaStorageBus part;
private PartEssentiaStorageBus part;
private EntityPlayer player;
public ContainerPartEssentiaStorageBus( final AEPartEssentiaStorageBus part, final EntityPlayer player )
public ContainerPartEssentiaStorageBus( final PartEssentiaStorageBus part, final EntityPlayer player )
{
// Set the player
this.player = player;
@@ -5,7 +5,7 @@ import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import thaumicenergistics.api.grid.IEssentiaGrid;
import thaumicenergistics.api.grid.IMEEssentiaMonitor;
import thaumicenergistics.common.parts.AbstractAEPartBase;
import thaumicenergistics.common.parts.ThEPartBase;
import appeng.api.networking.GridFlags;
import appeng.api.networking.GridNotification;
import appeng.api.networking.IGrid;
@@ -33,14 +33,14 @@ public class AEPartGridBlock
/**
* The part using this gridblock.
*/
protected AbstractAEPartBase part;
protected ThEPartBase part;
/**
* Create the gridblock for the specified part.
*
* @param part
*/
public AEPartGridBlock( final AbstractAEPartBase part )
public AEPartGridBlock( final ThEPartBase part )
{
this.part = part;
}
@@ -8,7 +8,7 @@ import net.minecraftforge.fluids.FluidStack;
import thaumcraft.api.aspects.Aspect;
import thaumicenergistics.api.ThEApi;
import thaumicenergistics.common.fluids.GaseousEssentia;
import thaumicenergistics.common.parts.AEPartEssentiaStorageBus;
import thaumicenergistics.common.parts.PartEssentiaStorageBus;
import appeng.api.config.AccessRestriction;
import appeng.api.config.Actionable;
import appeng.api.networking.IGridNode;
@@ -33,7 +33,7 @@ public abstract class HandlerEssentiaStorageBusBase
/**
* Storage bus associated with this handler.
*/
protected AEPartEssentiaStorageBus partStorageBus;
protected PartEssentiaStorageBus partStorageBus;
/**
* Controls what operations this bus is allowed to perform.
@@ -67,7 +67,7 @@ public abstract class HandlerEssentiaStorageBusBase
*
* @param part
*/
public HandlerEssentiaStorageBusBase( final AEPartEssentiaStorageBus part )
public HandlerEssentiaStorageBusBase( final PartEssentiaStorageBus part )
{
// Set the part
this.partStorageBus = part;
@@ -3,7 +3,7 @@ package thaumicenergistics.common.inventory;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.fluids.FluidStack;
import thaumicenergistics.common.fluids.GaseousEssentia;
import thaumicenergistics.common.parts.AEPartEssentiaStorageBus;
import thaumicenergistics.common.parts.PartEssentiaStorageBus;
import thaumicenergistics.integration.tc.EssentiaConversionHelper;
import appeng.api.AEApi;
import appeng.api.config.Actionable;
@@ -20,7 +20,7 @@ public class HandlerEssentiaStorageBusCondenser
private TileCondenser condenser = null;
public HandlerEssentiaStorageBusCondenser( final AEPartEssentiaStorageBus part )
public HandlerEssentiaStorageBusCondenser( final PartEssentiaStorageBus part )
{
super( part );
}
@@ -12,7 +12,7 @@ import thaumcraft.common.tiles.TileEssentiaReservoir;
import thaumcraft.common.tiles.TileJarFillableVoid;
import thaumicenergistics.api.storage.IAspectStack;
import thaumicenergistics.common.fluids.GaseousEssentia;
import thaumicenergistics.common.parts.AEPartEssentiaStorageBus;
import thaumicenergistics.common.parts.PartEssentiaStorageBus;
import thaumicenergistics.integration.tc.EssentiaConversionHelper;
import thaumicenergistics.integration.tc.EssentiaTileContainerHelper;
import appeng.api.AEApi;
@@ -36,7 +36,7 @@ class HandlerEssentiaStorageBusContainer
*/
Hashtable<Aspect, Long> cachedContainerAspects = new Hashtable<Aspect, Long>();
public HandlerEssentiaStorageBusContainer( final AEPartEssentiaStorageBus part )
public HandlerEssentiaStorageBusContainer( final PartEssentiaStorageBus part )
{
super( part );
}
@@ -2,7 +2,7 @@ package thaumicenergistics.common.inventory;
import net.minecraft.tileentity.TileEntity;
import thaumcraft.api.aspects.IAspectContainer;
import thaumicenergistics.common.parts.AEPartEssentiaStorageBus;
import thaumicenergistics.common.parts.PartEssentiaStorageBus;
import appeng.api.config.Actionable;
import appeng.api.networking.IGridNode;
import appeng.api.networking.security.BaseActionSource;
@@ -48,7 +48,7 @@ public class HandlerEssentiaStorageBusDuality
*
* @param part
*/
public HandlerEssentiaStorageBusDuality( final AEPartEssentiaStorageBus part )
public HandlerEssentiaStorageBusDuality( final PartEssentiaStorageBus part )
{
super( part );
}
@@ -1,7 +1,7 @@
package thaumicenergistics.common.inventory;
import net.minecraft.tileentity.TileEntity;
import thaumicenergistics.common.parts.AEPartEssentiaStorageBus;
import thaumicenergistics.common.parts.PartEssentiaStorageBus;
import appeng.api.AEApi;
import appeng.api.config.Actionable;
import appeng.api.config.IncludeExclude;
@@ -57,7 +57,7 @@ class HandlerEssentiaStorageBusInterface
*
* @param part
*/
public HandlerEssentiaStorageBusInterface( final AEPartEssentiaStorageBus part )
public HandlerEssentiaStorageBusInterface( final PartEssentiaStorageBus part )
{
super( part );
}
@@ -1,26 +0,0 @@
package thaumicenergistics.common.items;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
public abstract class EssentiaStorageBase
extends Item
{
// TODO: Does this really need to be a class? I think not.
public static final int INDEX_1K = 0;
public static final int INDEX_4K = 1;
public static final int INDEX_16K = 2;
public static final int INDEX_64K = 3;
public static final int INDEX_CREATIVE = 4;
protected static final String[] SUFFIXES = { "1k", "4k", "16k", "64k", "creative" };
protected static final int[] SIZES = { 1024, 4096, 16348, 65536, 0 };
protected static final EnumRarity[] RARITIES = { EnumRarity.uncommon, EnumRarity.uncommon, EnumRarity.rare, EnumRarity.rare, EnumRarity.epic };
}
@@ -178,7 +178,7 @@ public class ItemCraftingAspect
@SideOnly(Side.CLIENT)
public void getSubItems( final Item item, final CreativeTabs par2CreativeTabs, final List itemList )
{
// Note: Don't show these
// NOTE: Don't show these
/*
for( Aspect aspect : Aspect.aspects.values() )
{
@@ -24,6 +24,7 @@ import thaumicenergistics.common.inventory.HandlerItemEssentiaCellCreative;
import thaumicenergistics.common.registries.ItemEnum;
import thaumicenergistics.common.registries.ThEStrings;
import thaumicenergistics.common.storage.AspectStackComparator;
import thaumicenergistics.common.storage.EnumEssentiaStorageTypes;
import appeng.api.AEApi;
import appeng.api.implementations.tiles.IChestOrDrive;
import appeng.api.implementations.tiles.IMEChest;
@@ -33,25 +34,31 @@ import appeng.api.storage.data.IAEFluidStack;
import appeng.core.localization.GuiText;
public class ItemEssentiaCell
extends EssentiaStorageBase
extends Item
implements ICellHandler
{
private static final double[] IDLE_DRAIN_AMOUNTS = { 0.5D, 1.0D, 1.5D, 2.0D, 0.0D };
private static final int MAX_TYPES = 12, CREATIVE_MAX_TYPES = 63;
/**
* Status of the cell.
*/
private static final int CELL_STATUS_MISSING = 0, CELL_STATUS_HAS_ROOM = 1, CELL_STATUS_TYPES_FULL = 2, CELL_STATUS_FULL = 3;
/**
* Icons for each type.
*/
private IIcon[] icons;
public ItemEssentiaCell()
{
// Add the handler to AE2
AEApi.instance().registries().cell().addCellHandler( this );
// Set max stack size to 1
this.setMaxStackSize( 1 );
// No damage
this.setMaxDamage( 0 );
// Has sub-types
this.setHasSubtypes( true );
}
@@ -155,7 +162,7 @@ public class ItemEssentiaCell
@Override
public double cellIdleDrain( final ItemStack itemStack, final IMEInventory handler )
{
return ItemEssentiaCell.IDLE_DRAIN_AMOUNTS[itemStack.getItemDamage()];
return EnumEssentiaStorageTypes.fromIndex[itemStack.getItemDamage()].idleAEPowerDrain;
}
/**
@@ -164,16 +171,20 @@ public class ItemEssentiaCell
@Override
public IMEInventoryHandler getCellInventory( final ItemStack essentiaCell, final ISaveProvider saveProvider, final StorageChannel channel )
{
if( ( channel != StorageChannel.FLUIDS ) || ( essentiaCell.getItem() != this ) )
// Ensure the channel is fluid and there is an appropriate item.
if( ( channel != StorageChannel.FLUIDS ) || !( essentiaCell.getItem() instanceof ItemEssentiaCell ) )
{
return null;
}
if( essentiaCell.getItemDamage() == EssentiaStorageBase.INDEX_CREATIVE )
// Is the type creative?
if( essentiaCell.getItemDamage() == EnumEssentiaStorageTypes.Type_Creative.index )
{
// Return a creative handler.
return new HandlerItemEssentiaCellCreative( essentiaCell, saveProvider );
}
// Return a standard handler.
return new HandlerItemEssentiaCell( essentiaCell, saveProvider );
}
@@ -183,8 +194,10 @@ public class ItemEssentiaCell
@Override
public IIcon getIconFromDamage( final int dmg )
{
int index = MathHelper.clamp_int( dmg, 0, EssentiaStorageBase.SIZES.length - 1 );
// Clamp the index
int index = MathHelper.clamp_int( dmg, 0, EnumEssentiaStorageTypes.fromIndex.length - 1 );
// Return the icon
return this.icons[index];
}
@@ -195,10 +208,10 @@ public class ItemEssentiaCell
public EnumRarity getRarity( final ItemStack itemStack )
{
// Get the index based off of the meta data
int index = MathHelper.clamp_int( itemStack.getItemDamage(), 0, EssentiaStorageBase.RARITIES.length - 1 );
int index = MathHelper.clamp_int( itemStack.getItemDamage(), 0, EnumEssentiaStorageTypes.fromIndex.length - 1 );
// Return the rarity
return EssentiaStorageBase.RARITIES[index];
return EnumEssentiaStorageTypes.fromIndex[index].rarity;
}
/**
@@ -245,9 +258,9 @@ public class ItemEssentiaCell
@Override
public void getSubItems( final Item item, final CreativeTabs creativeTab, final List listSubItems )
{
for( int i = 0; i < EssentiaStorageBase.SIZES.length; i++ )
for( EnumEssentiaStorageTypes type : EnumEssentiaStorageTypes.fromIndex )
{
listSubItems.add( new ItemStack( item, 1, i ) );
listSubItems.add( type.getCell() );
}
}
@@ -290,27 +303,7 @@ public class ItemEssentiaCell
@Override
public String getUnlocalizedName( final ItemStack itemStack )
{
switch ( itemStack.getItemDamage() )
{
case 0:
return ThEStrings.Item_EssentiaCell_1k.getUnlocalized();
case 1:
return ThEStrings.Item_EssentiaCell_4k.getUnlocalized();
case 2:
return ThEStrings.Item_EssentiaCell_16k.getUnlocalized();
case 3:
return ThEStrings.Item_EssentiaCell_64k.getUnlocalized();
case 4:
return ThEStrings.Item_EssentiaCell_Creative.getUnlocalized();
default:
return "";
}
return EnumEssentiaStorageTypes.fromIndex[itemStack.getItemDamage()].cellName.getUnlocalized();
}
/**
@@ -330,7 +323,7 @@ public class ItemEssentiaCell
*/
public int maxStorage( final ItemStack essentiaCell )
{
return EssentiaStorageBase.SIZES[Math.max( 0, essentiaCell.getItemDamage() )];
return EnumEssentiaStorageTypes.fromIndex[essentiaCell.getItemDamage()].capacity;
}
/**
@@ -341,16 +334,11 @@ public class ItemEssentiaCell
*/
public int maxTypes( final ItemStack essentiaCell )
{
if( essentiaCell.getItemDamage() == EssentiaStorageBase.INDEX_CREATIVE )
{
return ItemEssentiaCell.CREATIVE_MAX_TYPES;
}
return ItemEssentiaCell.MAX_TYPES;
return EnumEssentiaStorageTypes.fromIndex[essentiaCell.getItemDamage()].maxStoredTypes;
}
/**
* Attempts to remove the storage element.
* Attempts to remove the storage component.
*/
@Override
public ItemStack onItemRightClick( final ItemStack essentiaCell, final World world, final EntityPlayer player )
@@ -362,7 +350,7 @@ public class ItemEssentiaCell
}
// Ensure this is not a creative cell
if( essentiaCell.getItemDamage() == EssentiaStorageBase.INDEX_CREATIVE )
if( essentiaCell.getItemDamage() == EnumEssentiaStorageTypes.Type_Creative.index )
{
return essentiaCell;
}
@@ -384,7 +372,7 @@ public class ItemEssentiaCell
if( ( cellHandler.getUsedBytes() == 0 ) && ( player.inventory.addItemStackToInventory( ItemEnum.STORAGE_CASING.getStack() ) ) )
{
// Return the storage component
return ItemEnum.STORAGE_COMPONENT.getDMGStack( essentiaCell.getItemDamage() );
return EnumEssentiaStorageTypes.fromIndex[essentiaCell.getItemDamage()].getComponent( 1 );
}
// Can not remove storage component, return the current cell as is.
@@ -427,11 +415,13 @@ public class ItemEssentiaCell
@Override
public void registerIcons( final IIconRegister iconRegister )
{
this.icons = new IIcon[EssentiaStorageBase.SUFFIXES.length];
// Create the icon array
this.icons = new IIcon[EnumEssentiaStorageTypes.fromIndex.length];
for( int i = 0; i < EssentiaStorageBase.SUFFIXES.length; i++ )
// Add each type
for( int i = 0; i < this.icons.length; i++ )
{
this.icons[i] = iconRegister.registerIcon( ThaumicEnergistics.MOD_ID + ":essentia.cell." + EssentiaStorageBase.SUFFIXES[i] );
this.icons[i] = iconRegister.registerIcon( ThaumicEnergistics.MOD_ID + ":essentia.cell." + EnumEssentiaStorageTypes.fromIndex[i].suffix );
}
}
@@ -7,61 +7,64 @@ import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import thaumicenergistics.common.ThaumicEnergistics;
import thaumicenergistics.common.registries.ThEStrings;
import thaumicenergistics.common.storage.EnumEssentiaStorageTypes;
import appeng.api.implementations.items.IStorageComponent;
public class ItemStorageComponent
extends EssentiaStorageBase
extends Item
implements IStorageComponent
{
/**
* Component icons.
*/
private IIcon[] icons;
public ItemStorageComponent()
{
// No damage
this.setMaxDamage( 0 );
// Has subtypes
this.setHasSubtypes( true );
// Goes in ThE's creative tab.
this.setCreativeTab( ThaumicEnergistics.ThETab );
}
@Override
public int getBytes( final ItemStack itemStack )
{
return EssentiaStorageBase.SIZES[itemStack.getItemDamage()];
return EnumEssentiaStorageTypes.fromIndex[itemStack.getItemDamage()].capacity;
}
@Override
public IIcon getIconFromDamage( final int damage )
{
int index = MathHelper.clamp_int( damage, 0, EssentiaStorageBase.SIZES.length - 1 );
return this.icons[index];
// Return icon
return this.icons[damage];
}
@Override
public EnumRarity getRarity( final ItemStack itemStack )
{
// Get the index based off of the meta data
int index = MathHelper.clamp_int( itemStack.getItemDamage(), 0, EssentiaStorageBase.RARITIES.length - 1 );
// Return the rarity
return EssentiaStorageBase.RARITIES[index];
return EnumEssentiaStorageTypes.fromIndex[itemStack.getItemDamage()].rarity;
}
@Override
public void getSubItems( final Item item, final CreativeTabs creativeTab, final List itemList )
{
for( int i = 0; i < EssentiaStorageBase.SIZES.length; i++ )
for( EnumEssentiaStorageTypes type : EnumEssentiaStorageTypes.fromIndex )
{
// Skip the creative cell
if( i == EssentiaStorageBase.INDEX_CREATIVE )
// Skip the creative cell, it has no component
if( type == EnumEssentiaStorageTypes.Type_Creative )
{
continue;
}
itemList.add( type.getComponent( 1 ) );
itemList.add( new ItemStack( item, 1, i ) );
}
}
@@ -74,24 +77,7 @@ public class ItemStorageComponent
@Override
public String getUnlocalizedName( final ItemStack itemStack )
{
switch ( itemStack.getItemDamage() )
{
case 0:
return ThEStrings.Item_StorageComponent_1k.getUnlocalized();
case 1:
return ThEStrings.Item_StorageComponent_4k.getUnlocalized();
case 2:
return ThEStrings.Item_StorageComponent_16k.getUnlocalized();
case 3:
return ThEStrings.Item_StorageComponent_64k.getUnlocalized();
default:
return "";
}
return EnumEssentiaStorageTypes.fromIndex[itemStack.getItemDamage()].componentName.getUnlocalized();
}
@Override
@@ -103,17 +89,14 @@ public class ItemStorageComponent
@Override
public void registerIcons( final IIconRegister iconRegister )
{
this.icons = new IIcon[EssentiaStorageBase.SUFFIXES.length];
// Create the icon array
this.icons = new IIcon[EnumEssentiaStorageTypes.fromIndex.length];
for( int i = 0; i < EssentiaStorageBase.SUFFIXES.length; i++ )
// Add each type
for( int i = 0; i < this.icons.length; i++ )
{
// Skip the creative cell
if( i == EssentiaStorageBase.INDEX_CREATIVE )
{
continue;
}
this.icons[i] = iconRegister.registerIcon( ThaumicEnergistics.MOD_ID + ":storage.component." + EssentiaStorageBase.SUFFIXES[i] );
this.icons[i] = iconRegister.registerIcon( ThaumicEnergistics.MOD_ID + ":storage.component." +
EnumEssentiaStorageTypes.fromIndex[i].suffix );
}
}
@@ -16,7 +16,7 @@ import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.util.ForgeDirection;
import thaumcraft.api.aspects.Aspect;
import thaumicenergistics.common.parts.AbstractAEPartBase;
import thaumicenergistics.common.parts.ThEPartBase;
import appeng.api.parts.IPartHost;
import appeng.api.storage.data.IAEItemStack;
import appeng.util.item.AEItemStack;
@@ -117,13 +117,13 @@ public abstract class ThEBasePacket
* @param stream
* @return
*/
protected static AbstractAEPartBase readPart( final ByteBuf stream )
protected static ThEPartBase readPart( final ByteBuf stream )
{
ForgeDirection side = ForgeDirection.getOrientation( stream.readInt() );
IPartHost host = (IPartHost)ThEBasePacket.readTileEntity( stream );
return (AbstractAEPartBase)host.getPart( side );
return (ThEPartBase)host.getPart( side );
}
/**
@@ -233,7 +233,7 @@ public abstract class ThEBasePacket
* @param part
* @param stream
*/
protected static void writePart( final AbstractAEPartBase part, final ByteBuf stream )
protected static void writePart( final ThEPartBase part, final ByteBuf stream )
{
stream.writeInt( part.getSide().ordinal() );
@@ -6,7 +6,7 @@ import thaumcraft.api.aspects.Aspect;
import thaumicenergistics.common.network.IAspectSlotPart;
import thaumicenergistics.common.network.NetworkHandler;
import thaumicenergistics.common.network.ThEBasePacket;
import thaumicenergistics.common.parts.AbstractAEPartBase;
import thaumicenergistics.common.parts.ThEPartBase;
public class Packet_S_AspectSlot
extends ThEServerPacket
@@ -79,7 +79,7 @@ public class Packet_S_AspectSlot
{
case Packet_S_AspectSlot.MODE_SET_ASPECT:
// Write the part
ThEBasePacket.writePart( (AbstractAEPartBase)this.part, stream );
ThEBasePacket.writePart( (ThEPartBase)this.part, stream );
// Write the index
stream.writeInt( this.index );
@@ -7,7 +7,7 @@ import thaumicenergistics.api.ThEApi;
import thaumicenergistics.common.ThEGuiHandler;
import thaumicenergistics.common.network.NetworkHandler;
import thaumicenergistics.common.network.ThEBasePacket;
import thaumicenergistics.common.parts.AbstractAEPartBase;
import thaumicenergistics.common.parts.ThEPartBase;
public class Packet_S_ChangeGui
extends ThEServerPacket
@@ -20,7 +20,7 @@ public class Packet_S_ChangeGui
MODE_WIRELESS = 2;
private int guiID;
private AbstractAEPartBase part;
private ThEPartBase part;
private World world;
private int x;
private int y;
@@ -65,7 +65,7 @@ public class Packet_S_ChangeGui
NetworkHandler.sendPacketToServer( packet );
}
public static void sendGuiChangeToPart( final AbstractAEPartBase part, final EntityPlayer player, final World world, final int x,
public static void sendGuiChangeToPart( final ThEPartBase part, final EntityPlayer player, final World world, final int x,
final int y, final int z )
{
Packet_S_ChangeGui packet = newPacket( player, MODE_PART );
@@ -4,7 +4,7 @@ import io.netty.buffer.ByteBuf;
import net.minecraft.entity.player.EntityPlayer;
import thaumicenergistics.common.network.NetworkHandler;
import thaumicenergistics.common.network.ThEBasePacket;
import thaumicenergistics.common.parts.AEPartEssentiaLevelEmitter;
import thaumicenergistics.common.parts.PartEssentiaLevelEmitter;
public class Packet_S_EssentiaEmitter
extends ThEServerPacket
@@ -17,7 +17,7 @@ public class Packet_S_EssentiaEmitter
private static final byte MODE_TOGGLE_REDSTONE = 3;
private AEPartEssentiaLevelEmitter part;
private PartEssentiaLevelEmitter part;
private long wantedAmount;
@@ -42,7 +42,7 @@ public class Packet_S_EssentiaEmitter
return packet;
}
public static void sendRedstoneModeToggle( final AEPartEssentiaLevelEmitter part, final EntityPlayer player )
public static void sendRedstoneModeToggle( final PartEssentiaLevelEmitter part, final EntityPlayer player )
{
Packet_S_EssentiaEmitter packet = newPacket( player, MODE_TOGGLE_REDSTONE );
@@ -61,7 +61,7 @@ public class Packet_S_EssentiaEmitter
* @param player
* @return
*/
public static void sendUpdateRequest( final AEPartEssentiaLevelEmitter part, final EntityPlayer player )
public static void sendUpdateRequest( final PartEssentiaLevelEmitter part, final EntityPlayer player )
{
Packet_S_EssentiaEmitter packet = newPacket( player, MODE_REQUEST_UPDATE );
@@ -80,7 +80,7 @@ public class Packet_S_EssentiaEmitter
* @param player
* @return
*/
public static void sendWantedAmount( final long wantedAmount, final AEPartEssentiaLevelEmitter part,
public static void sendWantedAmount( final long wantedAmount, final PartEssentiaLevelEmitter part,
final EntityPlayer player )
{
Packet_S_EssentiaEmitter packet = newPacket( player, MODE_SEND_WANTED );
@@ -103,7 +103,7 @@ public class Packet_S_EssentiaEmitter
* @param player
* @return
*/
public static void sendWantedAmountDelta( final int adjustmentAmount, final AEPartEssentiaLevelEmitter part,
public static void sendWantedAmountDelta( final int adjustmentAmount, final PartEssentiaLevelEmitter part,
final EntityPlayer player )
{
Packet_S_EssentiaEmitter packet = newPacket( player, MODE_ADJUST_WANTED );
@@ -152,12 +152,12 @@ public class Packet_S_EssentiaEmitter
{
case Packet_S_EssentiaEmitter.MODE_REQUEST_UPDATE:
// Read the part
this.part = (AEPartEssentiaLevelEmitter)ThEBasePacket.readPart( stream );
this.part = (PartEssentiaLevelEmitter)ThEBasePacket.readPart( stream );
break;
case Packet_S_EssentiaEmitter.MODE_SEND_WANTED:
// Read the part
this.part = (AEPartEssentiaLevelEmitter)ThEBasePacket.readPart( stream );
this.part = (PartEssentiaLevelEmitter)ThEBasePacket.readPart( stream );
// Read the wanted amount
this.wantedAmount = stream.readLong();
@@ -165,7 +165,7 @@ public class Packet_S_EssentiaEmitter
case Packet_S_EssentiaEmitter.MODE_ADJUST_WANTED:
// Read the part
this.part = (AEPartEssentiaLevelEmitter)ThEBasePacket.readPart( stream );
this.part = (PartEssentiaLevelEmitter)ThEBasePacket.readPart( stream );
// Read the adjustment amount
this.adjustmentAmount = stream.readInt();
@@ -173,7 +173,7 @@ public class Packet_S_EssentiaEmitter
case Packet_S_EssentiaEmitter.MODE_TOGGLE_REDSTONE:
// Read the part
this.part = (AEPartEssentiaLevelEmitter)ThEBasePacket.readPart( stream );
this.part = (PartEssentiaLevelEmitter)ThEBasePacket.readPart( stream );
break;
}
}
@@ -4,15 +4,15 @@ import io.netty.buffer.ByteBuf;
import net.minecraft.entity.player.EntityPlayer;
import thaumicenergistics.common.network.NetworkHandler;
import thaumicenergistics.common.network.ThEBasePacket;
import thaumicenergistics.common.parts.AEPartEssentiaExportBus;
import thaumicenergistics.common.parts.AbstractAEPartEssentiaIOBus;
import thaumicenergistics.common.parts.PartEssentiaExportBus;
import thaumicenergistics.common.parts.ThEPartEssentiaIOBus_Base;
public class Packet_S_EssentiaIOBus
extends ThEServerPacket
{
private static final byte MODE_REQUEST_FULL_UPDATE = 0, MODE_REQUEST_CHANGE_REDSTONE_MODE = 1, MODE_REQUEST_CHANGE_VOID_MODE = 2;
private AbstractAEPartEssentiaIOBus part;
private ThEPartEssentiaIOBus_Base part;
/**
* Creates the packet
@@ -21,7 +21,7 @@ public class Packet_S_EssentiaIOBus
* @param mode
* @return
*/
private static Packet_S_EssentiaIOBus newPacket( final EntityPlayer player, final byte mode, final AbstractAEPartEssentiaIOBus part )
private static Packet_S_EssentiaIOBus newPacket( final EntityPlayer player, final byte mode, final ThEPartEssentiaIOBus_Base part )
{
// Create the packet
Packet_S_EssentiaIOBus packet = new Packet_S_EssentiaIOBus();
@@ -41,7 +41,7 @@ public class Packet_S_EssentiaIOBus
* @param part
* @return
*/
public static void sendFullUpdateRequest( final EntityPlayer player, final AbstractAEPartEssentiaIOBus part )
public static void sendFullUpdateRequest( final EntityPlayer player, final ThEPartEssentiaIOBus_Base part )
{
Packet_S_EssentiaIOBus packet = newPacket( player, MODE_REQUEST_FULL_UPDATE, part );
@@ -56,7 +56,7 @@ public class Packet_S_EssentiaIOBus
* @param part
* @return
*/
public static void sendRedstoneModeChange( final EntityPlayer player, final AbstractAEPartEssentiaIOBus part )
public static void sendRedstoneModeChange( final EntityPlayer player, final ThEPartEssentiaIOBus_Base part )
{
Packet_S_EssentiaIOBus packet = newPacket( player, MODE_REQUEST_CHANGE_REDSTONE_MODE, part );
@@ -71,7 +71,7 @@ public class Packet_S_EssentiaIOBus
* @param part
* @return
*/
public static void sendVoidModeChange( final EntityPlayer player, final AEPartEssentiaExportBus part )
public static void sendVoidModeChange( final EntityPlayer player, final PartEssentiaExportBus part )
{
Packet_S_EssentiaIOBus packet = newPacket( player, MODE_REQUEST_CHANGE_VOID_MODE, part );
@@ -96,9 +96,9 @@ public class Packet_S_EssentiaIOBus
case Packet_S_EssentiaIOBus.MODE_REQUEST_CHANGE_VOID_MODE:
// Request a void mode change
if( this.part instanceof AEPartEssentiaExportBus )
if( this.part instanceof PartEssentiaExportBus )
{
( (AEPartEssentiaExportBus)this.part ).onClientRequestChangeVoidMode( this.player );
( (PartEssentiaExportBus)this.part ).onClientRequestChangeVoidMode( this.player );
}
break;
}
@@ -113,7 +113,7 @@ public class Packet_S_EssentiaIOBus
case Packet_S_EssentiaIOBus.MODE_REQUEST_CHANGE_REDSTONE_MODE:
case Packet_S_EssentiaIOBus.MODE_REQUEST_CHANGE_VOID_MODE:
// Read the part
this.part = ( (AbstractAEPartEssentiaIOBus)ThEBasePacket.readPart( stream ) );
this.part = ( (ThEPartEssentiaIOBus_Base)ThEBasePacket.readPart( stream ) );
break;
}
}
@@ -4,7 +4,7 @@ import io.netty.buffer.ByteBuf;
import net.minecraft.entity.player.EntityPlayer;
import thaumicenergistics.common.network.NetworkHandler;
import thaumicenergistics.common.network.ThEBasePacket;
import thaumicenergistics.common.parts.AEPartEssentiaStorageBus;
import thaumicenergistics.common.parts.PartEssentiaStorageBus;
public class Packet_S_EssentiaStorageBus
extends ThEServerPacket
@@ -12,7 +12,7 @@ public class Packet_S_EssentiaStorageBus
private static final byte MODE_REQUEST_FULL_UPDATE = 0;
private static final byte MODE_REQUEST_SET_VOID = 1;
private AEPartEssentiaStorageBus part;
private PartEssentiaStorageBus part;
private boolean isVoidAllowed;
/**
@@ -22,7 +22,7 @@ public class Packet_S_EssentiaStorageBus
* @param mode
* @return
*/
private static Packet_S_EssentiaStorageBus newPacket( final EntityPlayer player, final byte mode, final AEPartEssentiaStorageBus part )
private static Packet_S_EssentiaStorageBus newPacket( final EntityPlayer player, final byte mode, final PartEssentiaStorageBus part )
{
// Create the packet
Packet_S_EssentiaStorageBus packet = new Packet_S_EssentiaStorageBus();
@@ -35,7 +35,7 @@ public class Packet_S_EssentiaStorageBus
return packet;
}
public static void sendFullUpdateRequest( final EntityPlayer player, final AEPartEssentiaStorageBus part )
public static void sendFullUpdateRequest( final EntityPlayer player, final PartEssentiaStorageBus part )
{
Packet_S_EssentiaStorageBus packet = newPacket( player, MODE_REQUEST_FULL_UPDATE, part );
@@ -43,7 +43,7 @@ public class Packet_S_EssentiaStorageBus
NetworkHandler.sendPacketToServer( packet );
}
public static void setVoidAllowed( final EntityPlayer player, final AEPartEssentiaStorageBus part,
public static void setVoidAllowed( final EntityPlayer player, final PartEssentiaStorageBus part,
final boolean isVoidAllowed )
{
Packet_S_EssentiaStorageBus packet = newPacket( player, MODE_REQUEST_SET_VOID, part );
@@ -79,12 +79,12 @@ public class Packet_S_EssentiaStorageBus
{
case Packet_S_EssentiaStorageBus.MODE_REQUEST_FULL_UPDATE:
// Read the part
this.part = ( (AEPartEssentiaStorageBus)ThEBasePacket.readPart( stream ) );
this.part = ( (PartEssentiaStorageBus)ThEBasePacket.readPart( stream ) );
break;
case Packet_S_EssentiaStorageBus.MODE_REQUEST_SET_VOID:
// Read the part
this.part = ( (AEPartEssentiaStorageBus)ThEBasePacket.readPart( stream ) );
this.part = ( (PartEssentiaStorageBus)ThEBasePacket.readPart( stream ) );
// Read void
this.isVoidAllowed = stream.readBoolean();
break;
@@ -53,8 +53,8 @@ import appeng.items.storage.ItemViewCell;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class AEPartArcaneCraftingTerminal
extends AbstractAEPartRotateable
public class PartArcaneCraftingTerminal
extends ThERotateablePart
implements IInventory, IGridTickable, ICraftingIssuerHost, ITerminalHost
{
/**
@@ -120,7 +120,7 @@ public class AEPartArcaneCraftingTerminal
/**
* Inventory slots
*/
private final ItemStack[] slots = new ItemStack[AEPartArcaneCraftingTerminal.MY_INVENTORY_SIZE];
private final ItemStack[] slots = new ItemStack[PartArcaneCraftingTerminal.MY_INVENTORY_SIZE];
/**
* Containers wishing to be notified on inventory changes
@@ -130,17 +130,17 @@ public class AEPartArcaneCraftingTerminal
/**
* How the items are sorted.
*/
private SortOrder sortingOrder = AEPartArcaneCraftingTerminal.DEFAULT_SORT_ORDER;
private SortOrder sortingOrder = PartArcaneCraftingTerminal.DEFAULT_SORT_ORDER;
/**
* What direction are the items sorted.
*/
private SortDir sortingDirection = AEPartArcaneCraftingTerminal.DEFAULT_SORT_DIR;
private SortDir sortingDirection = PartArcaneCraftingTerminal.DEFAULT_SORT_DIR;
/**
* What items types are visible.
*/
private ViewItems viewMode = AEPartArcaneCraftingTerminal.DEFAULT_VIEW_MODE;
private ViewItems viewMode = PartArcaneCraftingTerminal.DEFAULT_VIEW_MODE;
/**
* Data pertaining to the linked digi-vis source
@@ -150,7 +150,7 @@ public class AEPartArcaneCraftingTerminal
/**
* Creates the terminal
*/
public AEPartArcaneCraftingTerminal()
public PartArcaneCraftingTerminal()
{
// Call super
super( AEPartsEnum.ArcaneCraftingTerminal );
@@ -165,7 +165,7 @@ public class AEPartArcaneCraftingTerminal
private boolean isSlotInRange( final int slotIndex )
{
// Is the slot in range?
return( ( slotIndex >= 0 ) && ( slotIndex < AEPartArcaneCraftingTerminal.MY_INVENTORY_SIZE ) );
return( ( slotIndex >= 0 ) && ( slotIndex < PartArcaneCraftingTerminal.MY_INVENTORY_SIZE ) );
}
/**
@@ -177,7 +177,7 @@ public class AEPartArcaneCraftingTerminal
private void notifyListeners( final int slotIndex )
{
// Did the crafting slots, wand, or results slot change?
boolean notifyCrafting = ( slotIndex <= AEPartArcaneCraftingTerminal.RESULT_SLOT_INDEX );
boolean notifyCrafting = ( slotIndex <= PartArcaneCraftingTerminal.RESULT_SLOT_INDEX );
// Loop over all listeners
for( ContainerPartArcaneCraftingTerminal listener : this.listeners )
@@ -329,10 +329,10 @@ public class AEPartArcaneCraftingTerminal
}
// Loop over inventory
for( int slotIndex = 0; slotIndex < AEPartArcaneCraftingTerminal.MY_INVENTORY_SIZE; slotIndex++ )
for( int slotIndex = 0; slotIndex < PartArcaneCraftingTerminal.MY_INVENTORY_SIZE; slotIndex++ )
{
// Skip if this is the output slot
if( slotIndex == AEPartArcaneCraftingTerminal.RESULT_SLOT_INDEX )
if( slotIndex == PartArcaneCraftingTerminal.RESULT_SLOT_INDEX )
{
continue;
}
@@ -369,7 +369,7 @@ public class AEPartArcaneCraftingTerminal
@Override
public double getIdlePowerUsage()
{
return AEPartArcaneCraftingTerminal.IDLE_POWER_DRAIN;
return PartArcaneCraftingTerminal.IDLE_POWER_DRAIN;
}
/**
@@ -402,7 +402,7 @@ public class AEPartArcaneCraftingTerminal
@Override
public int getLightLevel()
{
return( this.isActive() ? AbstractAEPartBase.ACTIVE_TERMINAL_LIGHT_LEVEL : 0 );
return( this.isActive() ? ThEPartBase.ACTIVE_TERMINAL_LIGHT_LEVEL : 0 );
}
/**
@@ -420,7 +420,7 @@ public class AEPartArcaneCraftingTerminal
@Override
public int getSizeInventory()
{
return AEPartArcaneCraftingTerminal.MY_INVENTORY_SIZE;
return PartArcaneCraftingTerminal.MY_INVENTORY_SIZE;
}
/**
@@ -529,13 +529,13 @@ public class AEPartArcaneCraftingTerminal
}
// Is this the wand slot?
if( slotIndex == AEPartArcaneCraftingTerminal.WAND_SLOT_INDEX )
if( slotIndex == PartArcaneCraftingTerminal.WAND_SLOT_INDEX )
{
// Is the item a wand?
return ThEUtils.isItemValidWand( proposedStack, false );
}
// Is this a view slot?
if( ( slotIndex >= AEPartArcaneCraftingTerminal.VIEW_SLOT_MIN ) && ( slotIndex <= AEPartArcaneCraftingTerminal.VIEW_SLOT_MAX ) )
if( ( slotIndex >= PartArcaneCraftingTerminal.VIEW_SLOT_MIN ) && ( slotIndex <= PartArcaneCraftingTerminal.VIEW_SLOT_MAX ) )
{
// Is the stack a view slot?
return( proposedStack.getItem() instanceof ItemViewCell );
@@ -659,10 +659,10 @@ public class AEPartArcaneCraftingTerminal
super.readFromNBT( data );
// Does the data tag have the list?
if( data.hasKey( AEPartArcaneCraftingTerminal.INVENTORY_NBT_KEY ) )
if( data.hasKey( PartArcaneCraftingTerminal.INVENTORY_NBT_KEY ) )
{
// Get the list
NBTTagList nbtTagList = (NBTTagList)data.getTag( AEPartArcaneCraftingTerminal.INVENTORY_NBT_KEY );
NBTTagList nbtTagList = (NBTTagList)data.getTag( PartArcaneCraftingTerminal.INVENTORY_NBT_KEY );
for( int listIndex = 0; listIndex < nbtTagList.tagCount(); listIndex++ )
{
@@ -670,7 +670,7 @@ public class AEPartArcaneCraftingTerminal
NBTTagCompound nbtCompound = nbtTagList.getCompoundTagAt( listIndex );
// Get the slot list
int slotIndex = nbtCompound.getByte( AEPartArcaneCraftingTerminal.SLOT_NBT_KEY );
int slotIndex = nbtCompound.getByte( PartArcaneCraftingTerminal.SLOT_NBT_KEY );
// Is it in range?
if( this.isSlotInRange( slotIndex ) )
@@ -679,7 +679,7 @@ public class AEPartArcaneCraftingTerminal
ItemStack slotStack = ItemStack.loadItemStackFromNBT( nbtCompound );
// Is the slot the wand slot?
if( slotIndex == AEPartArcaneCraftingTerminal.WAND_SLOT_INDEX )
if( slotIndex == PartArcaneCraftingTerminal.WAND_SLOT_INDEX )
{
// Validate the wand
if( !ThEUtils.isItemValidWand( slotStack, false ) )
@@ -697,27 +697,27 @@ public class AEPartArcaneCraftingTerminal
}
// Sort order
if( data.hasKey( AEPartArcaneCraftingTerminal.SORT_ORDER_NBT_KEY ) )
if( data.hasKey( PartArcaneCraftingTerminal.SORT_ORDER_NBT_KEY ) )
{
this.sortingOrder = EnumCache.AE_SORT_ORDERS[data.getInteger( AEPartArcaneCraftingTerminal.SORT_ORDER_NBT_KEY )];
this.sortingOrder = EnumCache.AE_SORT_ORDERS[data.getInteger( PartArcaneCraftingTerminal.SORT_ORDER_NBT_KEY )];
}
// Sort direction
if( data.hasKey( AEPartArcaneCraftingTerminal.SORT_DIRECTION_NBT_KEY ) )
if( data.hasKey( PartArcaneCraftingTerminal.SORT_DIRECTION_NBT_KEY ) )
{
this.sortingDirection = EnumCache.AE_SORT_DIRECTIONS[data.getInteger( AEPartArcaneCraftingTerminal.SORT_DIRECTION_NBT_KEY )];
this.sortingDirection = EnumCache.AE_SORT_DIRECTIONS[data.getInteger( PartArcaneCraftingTerminal.SORT_DIRECTION_NBT_KEY )];
}
// View mode
if( data.hasKey( AEPartArcaneCraftingTerminal.VIEW_MODE_NBT_KEY ) )
if( data.hasKey( PartArcaneCraftingTerminal.VIEW_MODE_NBT_KEY ) )
{
this.viewMode = EnumCache.AE_VIEW_ITEMS[data.getInteger( AEPartArcaneCraftingTerminal.VIEW_MODE_NBT_KEY )];
this.viewMode = EnumCache.AE_VIEW_ITEMS[data.getInteger( PartArcaneCraftingTerminal.VIEW_MODE_NBT_KEY )];
}
// Vis source info
if( data.hasKey( AEPartArcaneCraftingTerminal.VIS_INTERFACE_NBT_KEY ) )
if( data.hasKey( PartArcaneCraftingTerminal.VIS_INTERFACE_NBT_KEY ) )
{
this.visSourceInfo.readFromNBT( data, AEPartArcaneCraftingTerminal.VIS_INTERFACE_NBT_KEY );
this.visSourceInfo.readFromNBT( data, PartArcaneCraftingTerminal.VIS_INTERFACE_NBT_KEY );
}
}
@@ -764,7 +764,7 @@ public class AEPartArcaneCraftingTerminal
helper.renderInventoryBox( renderer );
helper.setBounds( 2.0F, 2.0F, 15.0F, 14.0F, 14.0F, 16.0F );
ts.setColorOpaque_I( AbstractAEPartBase.INVENTORY_OVERLAY_COLOR );
ts.setColorOpaque_I( ThEPartBase.INVENTORY_OVERLAY_COLOR );
helper.renderInventoryFace( BlockTextureManager.ARCANE_CRAFTING_TERMINAL.getTextures()[2], ForgeDirection.SOUTH, renderer );
ts.setColorOpaque_I( AEColor.Black.mediumVariant );
@@ -799,7 +799,7 @@ public class AEPartArcaneCraftingTerminal
if( this.isActive() )
{
// Set brightness
tessellator.setBrightness( AbstractAEPartBase.ACTIVE_FACE_BRIGHTNESS );
tessellator.setBrightness( ThEPartBase.ACTIVE_FACE_BRIGHTNESS );
// Draw corners
helper.setBounds( 2.0F, 2.0F, 15.0F, 14.0F, 14.0F, 16.0F );
@@ -892,14 +892,14 @@ public class AEPartArcaneCraftingTerminal
for( int armorSlot = 0; armorSlot < 4; ++armorSlot )
{
// Get the stored armor
ItemStack storedArmor = this.slots[AEPartArcaneCraftingTerminal.ARMOR_SLOT_MIN + armorSlot];
ItemStack storedArmor = this.slots[PartArcaneCraftingTerminal.ARMOR_SLOT_MIN + armorSlot];
// Get the player armor
ItemStack playerArmor = player.inventory.armorInventory[3 - armorSlot];
// Swap
player.inventoryContainer.putStackInSlot( 5 + armorSlot, storedArmor );
this.slots[AEPartArcaneCraftingTerminal.ARMOR_SLOT_MIN + armorSlot] = playerArmor;
this.slots[PartArcaneCraftingTerminal.ARMOR_SLOT_MIN + armorSlot] = playerArmor;
}
@@ -969,7 +969,7 @@ public class AEPartArcaneCraftingTerminal
wand.addRealVis( stack, vis, amountDrained, true );
// Inform listeners that wand has changed
this.notifyListeners( AEPartArcaneCraftingTerminal.WAND_SLOT_INDEX );
this.notifyListeners( PartArcaneCraftingTerminal.WAND_SLOT_INDEX );
}
}
@@ -991,7 +991,7 @@ public class AEPartArcaneCraftingTerminal
NBTTagList nbtList = new NBTTagList();
// Loop over the slots
for( int slotId = 0; slotId < AEPartArcaneCraftingTerminal.MY_INVENTORY_SIZE; slotId++ )
for( int slotId = 0; slotId < PartArcaneCraftingTerminal.MY_INVENTORY_SIZE; slotId++ )
{
// Is the slot not null?
if( this.slots[slotId] != null )
@@ -1000,7 +1000,7 @@ public class AEPartArcaneCraftingTerminal
NBTTagCompound nbtCompound = new NBTTagCompound();
// Set the slot ID
nbtCompound.setByte( AEPartArcaneCraftingTerminal.SLOT_NBT_KEY, (byte)slotId );
nbtCompound.setByte( PartArcaneCraftingTerminal.SLOT_NBT_KEY, (byte)slotId );
// Write the stack into the tag
this.slots[slotId].writeToNBT( nbtCompound );
@@ -1013,31 +1013,31 @@ public class AEPartArcaneCraftingTerminal
// Append the list to the data tag
if( nbtList.tagCount() > 0 )
{
data.setTag( AEPartArcaneCraftingTerminal.INVENTORY_NBT_KEY, nbtList );
data.setTag( PartArcaneCraftingTerminal.INVENTORY_NBT_KEY, nbtList );
}
// Write direction
if( this.sortingDirection != AEPartArcaneCraftingTerminal.DEFAULT_SORT_DIR )
if( this.sortingDirection != PartArcaneCraftingTerminal.DEFAULT_SORT_DIR )
{
data.setInteger( AEPartArcaneCraftingTerminal.SORT_DIRECTION_NBT_KEY, this.sortingDirection.ordinal() );
data.setInteger( PartArcaneCraftingTerminal.SORT_DIRECTION_NBT_KEY, this.sortingDirection.ordinal() );
}
// Write order
if( this.sortingOrder != AEPartArcaneCraftingTerminal.DEFAULT_SORT_ORDER )
if( this.sortingOrder != PartArcaneCraftingTerminal.DEFAULT_SORT_ORDER )
{
data.setInteger( AEPartArcaneCraftingTerminal.SORT_ORDER_NBT_KEY, this.sortingOrder.ordinal() );
data.setInteger( PartArcaneCraftingTerminal.SORT_ORDER_NBT_KEY, this.sortingOrder.ordinal() );
}
// Write view mode
if( this.viewMode != AEPartArcaneCraftingTerminal.DEFAULT_VIEW_MODE )
if( this.viewMode != PartArcaneCraftingTerminal.DEFAULT_VIEW_MODE )
{
data.setInteger( AEPartArcaneCraftingTerminal.VIEW_MODE_NBT_KEY, this.viewMode.ordinal() );
data.setInteger( PartArcaneCraftingTerminal.VIEW_MODE_NBT_KEY, this.viewMode.ordinal() );
}
// Write the vis source info
if( saveType != PartItemStack.Wrench )
{
this.visSourceInfo.writeToNBT( data, AEPartArcaneCraftingTerminal.VIS_INTERFACE_NBT_KEY );
this.visSourceInfo.writeToNBT( data, PartArcaneCraftingTerminal.VIS_INTERFACE_NBT_KEY );
}
}
}
@@ -25,8 +25,8 @@ import appeng.client.texture.CableBusTextures;
import appeng.util.InventoryAdaptor;
import appeng.util.Platform;
public class AEPartEssentiaConversionMonitor
extends AEPartEssentiaStorageMonitor
public class PartEssentiaConversionMonitor
extends PartEssentiaStorageMonitor
{
/**
* The number of ticks considered to be a double click.
@@ -48,7 +48,7 @@ public class AEPartEssentiaConversionMonitor
*/
private Aspect depositedAspect = null;
public AEPartEssentiaConversionMonitor()
public PartEssentiaConversionMonitor()
{
super( AEPartsEnum.EssentiaConversionMonitor );
@@ -326,7 +326,7 @@ public class AEPartEssentiaConversionMonitor
if( ( this.depositedPlayerID != -1 ) && ( this.depositedPlayerID == AEApi.instance().registries().players().getID( player.getGameProfile() ) ) )
{
// Was it a double click?
if( ( MinecraftServer.getServer().getTickCounter() - this.depositedTick ) <= AEPartEssentiaConversionMonitor.DOUBLE_CLICK_TICKS )
if( ( MinecraftServer.getServer().getTickCounter() - this.depositedTick ) <= PartEssentiaConversionMonitor.DOUBLE_CLICK_TICKS )
{
// Reset last interaction trackers
this.depositedPlayerID = -1;
@@ -21,8 +21,8 @@ import appeng.api.parts.PartItemStack;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class AEPartEssentiaExportBus
extends AbstractAEPartEssentiaIOBus
public class PartEssentiaExportBus
extends ThEPartEssentiaIOBus_Base
{
private static final String NBT_KEY_VOID = "IsVoidAllowed";
@@ -32,7 +32,7 @@ public class AEPartEssentiaExportBus
*/
private boolean isVoidAllowed = false;
public AEPartEssentiaExportBus()
public PartEssentiaExportBus()
{
super( AEPartsEnum.EssentiaExportBus );
}
@@ -208,9 +208,9 @@ public class AEPartEssentiaExportBus
super.readFromNBT( data );
// Read void
if( data.hasKey( AEPartEssentiaExportBus.NBT_KEY_VOID ) )
if( data.hasKey( PartEssentiaExportBus.NBT_KEY_VOID ) )
{
this.isVoidAllowed = data.getBoolean( AEPartEssentiaExportBus.NBT_KEY_VOID );
this.isVoidAllowed = data.getBoolean( PartEssentiaExportBus.NBT_KEY_VOID );
}
}
@@ -256,7 +256,7 @@ public class AEPartEssentiaExportBus
helper.renderInventoryBox( renderer );
// Face overlay
helper.setInvColor( AbstractAEPartBase.INVENTORY_OVERLAY_COLOR );
helper.setInvColor( ThEPartBase.INVENTORY_OVERLAY_COLOR );
ts.setBrightness( 0xF000F0 );
IIcon faceOverlayTexture = BlockTextureManager.ESSENTIA_EXPORT_BUS.getTextures()[1];
helper.renderInventoryFace( faceOverlayTexture, ForgeDirection.UP, renderer );
@@ -321,7 +321,7 @@ public class AEPartEssentiaExportBus
if( this.isActive() )
{
Tessellator.instance.setBrightness( AbstractAEPartBase.ACTIVE_FACE_BRIGHTNESS );
Tessellator.instance.setBrightness( ThEPartBase.ACTIVE_FACE_BRIGHTNESS );
}
IIcon faceOverlayTexture = BlockTextureManager.ESSENTIA_EXPORT_BUS.getTextures()[1];
@@ -344,7 +344,7 @@ public class AEPartEssentiaExportBus
// Write void
if( this.isVoidAllowed )
{
data.setBoolean( AEPartEssentiaExportBus.NBT_KEY_VOID, this.isVoidAllowed );
data.setBoolean( PartEssentiaExportBus.NBT_KEY_VOID, this.isVoidAllowed );
}
}
@@ -18,11 +18,11 @@ import appeng.api.util.AEColor;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class AEPartEssentiaImportBus
extends AbstractAEPartEssentiaIOBus
public class PartEssentiaImportBus
extends ThEPartEssentiaIOBus_Base
{
public AEPartEssentiaImportBus()
public PartEssentiaImportBus()
{
super( AEPartsEnum.EssentiaImportBus );
}
@@ -192,7 +192,7 @@ public class AEPartEssentiaImportBus
// Face overlay
helper.setBounds( 4.0F, 4.0F, 15.0F, 12.0F, 12.0F, 16.0F );
helper.setInvColor( AbstractAEPartBase.INVENTORY_OVERLAY_COLOR );
helper.setInvColor( ThEPartBase.INVENTORY_OVERLAY_COLOR );
ts.setBrightness( 15728880 );
helper.renderInventoryFace( BlockTextureManager.ESSENTIA_IMPORT_BUS.getTextures()[1], ForgeDirection.SOUTH, renderer );
@@ -221,12 +221,12 @@ public class AEPartEssentiaImportBus
}
else
{
ts.setColorOpaque_I( AbstractAEPartBase.INVENTORY_OVERLAY_COLOR );
ts.setColorOpaque_I( ThEPartBase.INVENTORY_OVERLAY_COLOR );
}
if( this.isActive() )
{
Tessellator.instance.setBrightness( AbstractAEPartBase.ACTIVE_FACE_BRIGHTNESS );
Tessellator.instance.setBrightness( ThEPartBase.ACTIVE_FACE_BRIGHTNESS );
}
// Face overlay
@@ -37,8 +37,8 @@ import appeng.util.Platform;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class AEPartEssentiaLevelEmitter
extends AbstractAEPartBase
public class PartEssentiaLevelEmitter
extends ThEPartBase
implements IAspectSlotPart, IEssentiaWatcherHost
{
/**
@@ -65,7 +65,7 @@ public class AEPartEssentiaLevelEmitter
/**
* Mode the emitter is in
*/
private RedstoneMode redstoneMode = AEPartEssentiaLevelEmitter.DEFAULT_REDSTONE_MODE;
private RedstoneMode redstoneMode = PartEssentiaLevelEmitter.DEFAULT_REDSTONE_MODE;
/**
* Threshold value
@@ -90,7 +90,7 @@ public class AEPartEssentiaLevelEmitter
/**
* Creates the part
*/
public AEPartEssentiaLevelEmitter()
public PartEssentiaLevelEmitter()
{
super( AEPartsEnum.EssentiaLevelEmitter );
}
@@ -259,7 +259,7 @@ public class AEPartEssentiaLevelEmitter
@Override
public double getIdlePowerUsage()
{
return AEPartEssentiaLevelEmitter.IDLE_POWER_DRAIN;
return PartEssentiaLevelEmitter.IDLE_POWER_DRAIN;
}
/**
@@ -427,27 +427,27 @@ public class AEPartEssentiaLevelEmitter
super.readFromNBT( data );
// Read the filter
if( data.hasKey( AEPartEssentiaLevelEmitter.NBT_KEY_ASPECT_FILTER ) )
if( data.hasKey( PartEssentiaLevelEmitter.NBT_KEY_ASPECT_FILTER ) )
{
this.trackedEssentia = Aspect.aspects.get( data.getString( AEPartEssentiaLevelEmitter.NBT_KEY_ASPECT_FILTER ) );
this.trackedEssentia = Aspect.aspects.get( data.getString( PartEssentiaLevelEmitter.NBT_KEY_ASPECT_FILTER ) );
}
// Read the redstone mode
if( data.hasKey( AEPartEssentiaLevelEmitter.NBT_KEY_REDSTONE_MODE ) )
if( data.hasKey( PartEssentiaLevelEmitter.NBT_KEY_REDSTONE_MODE ) )
{
this.redstoneMode = EnumCache.AE_REDSTONE_MODES[data.getInteger( AEPartEssentiaLevelEmitter.NBT_KEY_REDSTONE_MODE )];
this.redstoneMode = EnumCache.AE_REDSTONE_MODES[data.getInteger( PartEssentiaLevelEmitter.NBT_KEY_REDSTONE_MODE )];
}
// Read the wanted amount
if( data.hasKey( AEPartEssentiaLevelEmitter.NBT_KEY_WANTED_AMOUNT ) )
if( data.hasKey( PartEssentiaLevelEmitter.NBT_KEY_WANTED_AMOUNT ) )
{
this.wantedAmount = data.getLong( AEPartEssentiaLevelEmitter.NBT_KEY_WANTED_AMOUNT );
this.wantedAmount = data.getLong( PartEssentiaLevelEmitter.NBT_KEY_WANTED_AMOUNT );
}
// Read if emitting
if( data.hasKey( AEPartEssentiaLevelEmitter.NBT_KEY_IS_EMITTING ) )
if( data.hasKey( PartEssentiaLevelEmitter.NBT_KEY_IS_EMITTING ) )
{
this.isEmitting = data.getBoolean( AEPartEssentiaLevelEmitter.NBT_KEY_IS_EMITTING );
this.isEmitting = data.getBoolean( PartEssentiaLevelEmitter.NBT_KEY_IS_EMITTING );
}
}
@@ -516,7 +516,7 @@ public class AEPartEssentiaLevelEmitter
helper.setTexture( BlockTextureManager.ESSENTIA_LEVEL_EMITTER.getTextures()[1] );
// Set the brightness
Tessellator.instance.setBrightness( AbstractAEPartBase.ACTIVE_FACE_BRIGHTNESS );
Tessellator.instance.setBrightness( ThEPartBase.ACTIVE_FACE_BRIGHTNESS );
}
else
@@ -607,25 +607,25 @@ public class AEPartEssentiaLevelEmitter
if( this.trackedEssentia != null )
{
// Write the name of the aspect
data.setString( AEPartEssentiaLevelEmitter.NBT_KEY_ASPECT_FILTER, this.trackedEssentia.getTag() );
data.setString( PartEssentiaLevelEmitter.NBT_KEY_ASPECT_FILTER, this.trackedEssentia.getTag() );
}
// Write the redstone mode ordinal
if( this.redstoneMode != AEPartEssentiaLevelEmitter.DEFAULT_REDSTONE_MODE )
if( this.redstoneMode != PartEssentiaLevelEmitter.DEFAULT_REDSTONE_MODE )
{
data.setInteger( AEPartEssentiaLevelEmitter.NBT_KEY_REDSTONE_MODE, this.redstoneMode.ordinal() );
data.setInteger( PartEssentiaLevelEmitter.NBT_KEY_REDSTONE_MODE, this.redstoneMode.ordinal() );
}
// Write the threshold amount
if( this.wantedAmount > 0 )
{
data.setLong( AEPartEssentiaLevelEmitter.NBT_KEY_WANTED_AMOUNT, this.wantedAmount );
data.setLong( PartEssentiaLevelEmitter.NBT_KEY_WANTED_AMOUNT, this.wantedAmount );
}
// Write if emitting
if( ( saveType != PartItemStack.Wrench ) && this.isEmitting )
{
data.setBoolean( AEPartEssentiaLevelEmitter.NBT_KEY_IS_EMITTING, true );
data.setBoolean( PartEssentiaLevelEmitter.NBT_KEY_IS_EMITTING, true );
}
}
@@ -50,8 +50,8 @@ import appeng.tile.inventory.InvOperation;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class AEPartEssentiaStorageBus
extends AbstractAEPartBase
public class PartEssentiaStorageBus
extends ThEPartBase
implements IGridTickable, ICellContainer, IInventoryUpdateReceiver, IAspectSlotPart, IAEAppEngInventory, IPriorityHost
{
/**
@@ -83,7 +83,7 @@ public class AEPartEssentiaStorageBus
/**
* Filter list
*/
private List<Aspect> filteredAspects = new ArrayList<Aspect>( AEPartEssentiaStorageBus.FILTER_SIZE );
private List<Aspect> filteredAspects = new ArrayList<Aspect>( PartEssentiaStorageBus.FILTER_SIZE );
/**
* Upgrade inventory
@@ -98,13 +98,13 @@ public class AEPartEssentiaStorageBus
/**
* Creates the bus
*/
public AEPartEssentiaStorageBus()
public PartEssentiaStorageBus()
{
// Call super
super( AEPartsEnum.EssentiaStorageBus );
// Pre-fill the list with nulls
for( int index = 0; index < AEPartEssentiaStorageBus.FILTER_SIZE; index++ )
for( int index = 0; index < PartEssentiaStorageBus.FILTER_SIZE; index++ )
{
this.filteredAspects.add( null );
}
@@ -143,7 +143,7 @@ public class AEPartEssentiaStorageBus
}
// Add to the first open slot
for( int index = 0; index < AEPartEssentiaStorageBus.FILTER_SIZE; index++ )
for( int index = 0; index < PartEssentiaStorageBus.FILTER_SIZE; index++ )
{
// Is this space empty?
if( this.filteredAspects.get( index ) == null )
@@ -316,7 +316,7 @@ public class AEPartEssentiaStorageBus
@Override
public double getIdlePowerUsage()
{
return AEPartEssentiaStorageBus.IDLE_POWER_DRAIN;
return PartEssentiaStorageBus.IDLE_POWER_DRAIN;
}
/**
@@ -464,17 +464,17 @@ public class AEPartEssentiaStorageBus
super.readFromNBT( data );
// Read the priority
if( data.hasKey( AEPartEssentiaStorageBus.NBT_KEY_PRIORITY ) )
if( data.hasKey( PartEssentiaStorageBus.NBT_KEY_PRIORITY ) )
{
this.priority = data.getInteger( AEPartEssentiaStorageBus.NBT_KEY_PRIORITY );
this.priority = data.getInteger( PartEssentiaStorageBus.NBT_KEY_PRIORITY );
}
// Read the filter list
for( int index = 0; index < AEPartEssentiaStorageBus.FILTER_SIZE; index++ )
for( int index = 0; index < PartEssentiaStorageBus.FILTER_SIZE; index++ )
{
if( data.hasKey( AEPartEssentiaStorageBus.NBT_KEY_FILTER + index ) )
if( data.hasKey( PartEssentiaStorageBus.NBT_KEY_FILTER + index ) )
{
this.filteredAspects.set( index, Aspect.aspects.get( data.getString( AEPartEssentiaStorageBus.NBT_KEY_FILTER + index ) ) );
this.filteredAspects.set( index, Aspect.aspects.get( data.getString( PartEssentiaStorageBus.NBT_KEY_FILTER + index ) ) );
}
else
{
@@ -483,18 +483,18 @@ public class AEPartEssentiaStorageBus
}
// Read the upgrade inventory
if( data.hasKey( AEPartEssentiaStorageBus.NBT_KEY_UPGRADES ) )
if( data.hasKey( PartEssentiaStorageBus.NBT_KEY_UPGRADES ) )
{
this.upgradeInventory.readFromNBT( data, AEPartEssentiaStorageBus.NBT_KEY_UPGRADES );
this.upgradeInventory.readFromNBT( data, PartEssentiaStorageBus.NBT_KEY_UPGRADES );
// Update the handler inverted
this.onInventoryChanged( this.upgradeInventory );
}
// Read void
if( data.hasKey( AEPartEssentiaStorageBus.NBT_KEY_VOID ) )
if( data.hasKey( PartEssentiaStorageBus.NBT_KEY_VOID ) )
{
this.handler.setVoidAllowed( data.getBoolean( AEPartEssentiaStorageBus.NBT_KEY_VOID ) );
this.handler.setVoidAllowed( data.getBoolean( PartEssentiaStorageBus.NBT_KEY_VOID ) );
}
// Update the handler filter list
@@ -533,7 +533,7 @@ public class AEPartEssentiaStorageBus
// Color overlay
helper.setBounds( 2.0F, 2.0F, 15.0F, 14.0F, 14.0F, 16.0F );
helper.setInvColor( AbstractAEPartBase.INVENTORY_OVERLAY_COLOR );
helper.setInvColor( ThEPartBase.INVENTORY_OVERLAY_COLOR );
ts.setBrightness( 0xF000F0 );
helper.renderInventoryFace( BlockTextureManager.ESSENTIA_STORAGE_BUS.getTextures()[1], ForgeDirection.SOUTH, renderer );
@@ -562,7 +562,7 @@ public class AEPartEssentiaStorageBus
if( this.isActive() )
{
tessellator.setBrightness( AbstractAEPartBase.ACTIVE_FACE_BRIGHTNESS );
tessellator.setBrightness( ThEPartBase.ACTIVE_FACE_BRIGHTNESS );
}
// Mid
@@ -646,30 +646,30 @@ public class AEPartEssentiaStorageBus
// Write the priority
if( this.priority > 0 )
{
data.setInteger( AEPartEssentiaStorageBus.NBT_KEY_PRIORITY, this.priority );
data.setInteger( PartEssentiaStorageBus.NBT_KEY_PRIORITY, this.priority );
}
// Write the filters
for( int index = 0; index < AEPartEssentiaStorageBus.FILTER_SIZE; index++ )
for( int index = 0; index < PartEssentiaStorageBus.FILTER_SIZE; index++ )
{
Aspect aspect = this.filteredAspects.get( index );
if( aspect != null )
{
data.setString( AEPartEssentiaStorageBus.NBT_KEY_FILTER + index, aspect.getTag() );
data.setString( PartEssentiaStorageBus.NBT_KEY_FILTER + index, aspect.getTag() );
}
}
// Write upgrades
if( !this.upgradeInventory.isEmpty() )
{
this.upgradeInventory.writeToNBT( data, AEPartEssentiaStorageBus.NBT_KEY_UPGRADES );
this.upgradeInventory.writeToNBT( data, PartEssentiaStorageBus.NBT_KEY_UPGRADES );
}
// Write void
if( this.handler.isVoidAllowed() )
{
data.setBoolean( AEPartEssentiaStorageBus.NBT_KEY_VOID, this.handler.isVoidAllowed() );
data.setBoolean( PartEssentiaStorageBus.NBT_KEY_VOID, this.handler.isVoidAllowed() );
}
}
@@ -48,8 +48,8 @@ import cpw.mods.fml.common.network.ByteBufUtils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class AEPartEssentiaStorageMonitor
extends AbstractAEPartBase
public class PartEssentiaStorageMonitor
extends ThEPartBase
implements IPartStorageMonitor, IEssentiaWatcherHost, IPowerChannelState
{
/**
@@ -232,7 +232,7 @@ public class AEPartEssentiaStorageMonitor
*
* @param subPart
*/
protected AEPartEssentiaStorageMonitor( final AEPartsEnum subPart )
protected PartEssentiaStorageMonitor( final AEPartsEnum subPart )
{
super( subPart );
@@ -243,7 +243,7 @@ public class AEPartEssentiaStorageMonitor
/**
* Default constructor
*/
public AEPartEssentiaStorageMonitor()
public PartEssentiaStorageMonitor()
{
this( AEPartsEnum.EssentiaStorageMonitor );
}
@@ -653,7 +653,7 @@ public class AEPartEssentiaStorageMonitor
@Override
public double getIdlePowerUsage()
{
return AEPartEssentiaStorageMonitor.IDLE_DRAIN;
return PartEssentiaStorageMonitor.IDLE_DRAIN;
}
/**
@@ -662,7 +662,7 @@ public class AEPartEssentiaStorageMonitor
@Override
public int getLightLevel()
{
return( this.isActive() ? AbstractAEPartBase.ACTIVE_TERMINAL_LIGHT_LEVEL : 0 );
return( this.isActive() ? ThEPartBase.ACTIVE_TERMINAL_LIGHT_LEVEL : 0 );
}
/**
@@ -760,16 +760,16 @@ public class AEPartEssentiaStorageMonitor
super.readFromNBT( data );
// Read locked
if( data.hasKey( AEPartEssentiaStorageMonitor.NBT_KEY_LOCKED ) )
if( data.hasKey( PartEssentiaStorageMonitor.NBT_KEY_LOCKED ) )
{
this.monitorLocked = data.getBoolean( AEPartEssentiaStorageMonitor.NBT_KEY_LOCKED );
this.monitorLocked = data.getBoolean( PartEssentiaStorageMonitor.NBT_KEY_LOCKED );
}
// Read tracked
if( data.hasKey( AEPartEssentiaStorageMonitor.NBT_KEY_TRACKED_ASPECT ) )
if( data.hasKey( PartEssentiaStorageMonitor.NBT_KEY_TRACKED_ASPECT ) )
{
// Read the aspect
Aspect trackedAspect = Aspect.getAspect( data.getString( AEPartEssentiaStorageMonitor.NBT_KEY_TRACKED_ASPECT ) );
Aspect trackedAspect = Aspect.getAspect( data.getString( PartEssentiaStorageMonitor.NBT_KEY_TRACKED_ASPECT ) );
// Set the tracker
this.trackedEssentia.setTracked( new AspectStack( trackedAspect, 0 ) );
@@ -915,7 +915,7 @@ public class AEPartEssentiaStorageMonitor
// Light up if active
if( this.isActive() )
{
Tessellator.instance.setBrightness( AbstractAEPartBase.ACTIVE_FACE_BRIGHTNESS );
Tessellator.instance.setBrightness( ThEPartBase.ACTIVE_FACE_BRIGHTNESS );
}
// Dark corners
@@ -980,14 +980,14 @@ public class AEPartEssentiaStorageMonitor
// Write locked
if( this.monitorLocked )
{
data.setBoolean( AEPartEssentiaStorageMonitor.NBT_KEY_LOCKED, this.monitorLocked );
data.setBoolean( PartEssentiaStorageMonitor.NBT_KEY_LOCKED, this.monitorLocked );
}
// Write tracked data if valid
if( this.trackedEssentia.isValid() )
{
// Write the aspect
data.setString( AEPartEssentiaStorageMonitor.NBT_KEY_TRACKED_ASPECT, this.trackedEssentia.getAspectStack().getAspectTag() );
data.setString( PartEssentiaStorageMonitor.NBT_KEY_TRACKED_ASPECT, this.trackedEssentia.getAspectStack().getAspectTag() );
}
}
@@ -40,8 +40,8 @@ import appeng.util.Platform;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class AEPartEssentiaTerminal
extends AbstractAEPartRotateable
public class PartEssentiaTerminal
extends ThERotateablePart
implements ICraftingIssuerHost, ITerminalHost
{
@@ -93,7 +93,7 @@ public class AEPartEssentiaTerminal
}
};
public AEPartEssentiaTerminal()
public PartEssentiaTerminal()
{
super( AEPartsEnum.EssentiaTerminal );
}
@@ -194,7 +194,7 @@ public class AEPartEssentiaTerminal
@Override
public double getIdlePowerUsage()
{
return AEPartEssentiaTerminal.IDLE_POWER_DRAIN;
return PartEssentiaTerminal.IDLE_POWER_DRAIN;
}
public PrivateInventory getInventory()
@@ -214,7 +214,7 @@ public class AEPartEssentiaTerminal
@Override
public int getLightLevel()
{
return( this.isActive() ? AbstractAEPartBase.ACTIVE_TERMINAL_LIGHT_LEVEL : 0 );
return( this.isActive() ? ThEPartBase.ACTIVE_TERMINAL_LIGHT_LEVEL : 0 );
}
@Override
@@ -329,9 +329,9 @@ public class AEPartEssentiaTerminal
}
// Read inventory
if( data.hasKey( AEPartEssentiaTerminal.NBT_KEY_INVENTORY ) )
if( data.hasKey( PartEssentiaTerminal.NBT_KEY_INVENTORY ) )
{
this.inventory.readFromNBT( data, AEPartEssentiaTerminal.NBT_KEY_INVENTORY );
this.inventory.readFromNBT( data, PartEssentiaTerminal.NBT_KEY_INVENTORY );
}
// Read view mode
@@ -404,7 +404,7 @@ public class AEPartEssentiaTerminal
// Light up if active
if( this.isActive() )
{
Tessellator.instance.setBrightness( AbstractAEPartBase.ACTIVE_FACE_BRIGHTNESS );
Tessellator.instance.setBrightness( ThEPartBase.ACTIVE_FACE_BRIGHTNESS );
}
// Rotate the face texture
@@ -36,8 +36,8 @@ import appeng.api.parts.PartItemStack;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class AEPartVisInterface
extends AbstractAEPartBase
public class PartVisInterface
extends ThEPartBase
implements IGridTickable, IDigiVisSource
{
/**
@@ -104,7 +104,7 @@ public class AEPartVisInterface
/**
* Creates the interface.
*/
public AEPartVisInterface()
public PartVisInterface()
{
super( AEPartsEnum.VisInterface );
@@ -139,10 +139,10 @@ public class AEPartVisInterface
}
// Simulate a power drain
double drainedPower = eGrid.extractAEPower( AEPartVisInterface.POWER_PER_REQUESTED_VIS, Actionable.SIMULATE, PowerMultiplier.CONFIG );
double drainedPower = eGrid.extractAEPower( PartVisInterface.POWER_PER_REQUESTED_VIS, Actionable.SIMULATE, PowerMultiplier.CONFIG );
// Ensure we got the power we need
if( drainedPower < AEPartVisInterface.POWER_PER_REQUESTED_VIS )
if( drainedPower < PartVisInterface.POWER_PER_REQUESTED_VIS )
{
return 0;
}
@@ -154,7 +154,7 @@ public class AEPartVisInterface
if( amountReceived > 0 )
{
// Drain the power
eGrid.extractAEPower( AEPartVisInterface.POWER_PER_REQUESTED_VIS, Actionable.MODULATE, PowerMultiplier.CONFIG );
eGrid.extractAEPower( PartVisInterface.POWER_PER_REQUESTED_VIS, Actionable.MODULATE, PowerMultiplier.CONFIG );
}
// Return the amount we received
@@ -184,7 +184,7 @@ public class AEPartVisInterface
}
// Source must be a vis interface
if( !( p2pSource instanceof AEPartVisInterface ) )
if( !( p2pSource instanceof PartVisInterface ) )
{
return false;
}
@@ -196,7 +196,7 @@ public class AEPartVisInterface
}
// Source must not be a provider
if( ( (AEPartVisInterface)p2pSource ).isVisProvider() )
if( ( (PartVisInterface)p2pSource ).isVisProvider() )
{
return false;
}
@@ -226,7 +226,7 @@ public class AEPartVisInterface
}
// Has the alloted time passed for a change?
if( ( System.currentTimeMillis() - this.lastColorUpdate ) <= ( AEPartVisInterface.TIME_TO_CLEAR / 2 ) )
if( ( System.currentTimeMillis() - this.lastColorUpdate ) <= ( PartVisInterface.TIME_TO_CLEAR / 2 ) )
{
return;
}
@@ -574,22 +574,22 @@ public class AEPartVisInterface
super.readFromNBT( data );
// Does it contain the UID?
if( data.hasKey( AEPartVisInterface.NBT_KEY_UID ) )
if( data.hasKey( PartVisInterface.NBT_KEY_UID ) )
{
// Read the UID
this.UID = data.getLong( AEPartVisInterface.NBT_KEY_UID );
this.UID = data.getLong( PartVisInterface.NBT_KEY_UID );
}
// Is there provider data?
if( data.hasKey( AEPartVisInterface.NBT_KEY_IS_PROVIDER ) )
if( data.hasKey( PartVisInterface.NBT_KEY_IS_PROVIDER ) )
{
// Set provider status
this.isProvider = data.getBoolean( AEPartVisInterface.NBT_KEY_IS_PROVIDER );
this.isProvider = data.getBoolean( PartVisInterface.NBT_KEY_IS_PROVIDER );
// Read source information
if( data.hasKey( AEPartVisInterface.NBT_KEY_PROVIDER_SOURCE ) )
if( data.hasKey( PartVisInterface.NBT_KEY_PROVIDER_SOURCE ) )
{
this.visP2PSourceInfo.readFromNBT( data, AEPartVisInterface.NBT_KEY_PROVIDER_SOURCE );
this.visP2PSourceInfo.readFromNBT( data, PartVisInterface.NBT_KEY_PROVIDER_SOURCE );
}
}
}
@@ -681,7 +681,7 @@ public class AEPartVisInterface
{
if( this.visDrainingColor != 0 )
{
if( ( System.currentTimeMillis() - this.lastColorUpdate ) > AEPartVisInterface.TIME_TO_CLEAR )
if( ( System.currentTimeMillis() - this.lastColorUpdate ) > PartVisInterface.TIME_TO_CLEAR )
{
this.setDrainColor( 0 );
}
@@ -748,15 +748,15 @@ public class AEPartVisInterface
}
// Write the UID
data.setLong( AEPartVisInterface.NBT_KEY_UID, this.UID );
data.setLong( PartVisInterface.NBT_KEY_UID, this.UID );
if( this.isProvider )
{
// Write provider status
data.setBoolean( AEPartVisInterface.NBT_KEY_IS_PROVIDER, this.isProvider );
data.setBoolean( PartVisInterface.NBT_KEY_IS_PROVIDER, this.isProvider );
// Write source data
this.visP2PSourceInfo.writeToNBT( data, AEPartVisInterface.NBT_KEY_PROVIDER_SOURCE );
this.visP2PSourceInfo.writeToNBT( data, PartVisInterface.NBT_KEY_PROVIDER_SOURCE );
}
}
@@ -39,7 +39,7 @@ import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public abstract class AbstractAEPartBase
public abstract class ThEPartBase
implements IPart, IGridHost, IActionHost
{
private final static String NBT_KEY_OWNER = "Owner";
@@ -101,7 +101,7 @@ public abstract class AbstractAEPartBase
*/
public final ItemStack associatedItem;
public AbstractAEPartBase( final AEPartsEnum associatedPart )
public ThEPartBase( final AEPartsEnum associatedPart )
{
// Set the associated item
this.associatedItem = associatedPart.getStack();
@@ -541,9 +541,9 @@ public abstract class AbstractAEPartBase
public void readFromNBT( final NBTTagCompound data )
{
// Read the owner
if( data.hasKey( AbstractAEPartBase.NBT_KEY_OWNER ) )
if( data.hasKey( ThEPartBase.NBT_KEY_OWNER ) )
{
this.ownerID = data.getInteger( AbstractAEPartBase.NBT_KEY_OWNER );
this.ownerID = data.getInteger( ThEPartBase.NBT_KEY_OWNER );
}
}
@@ -739,7 +739,7 @@ public abstract class AbstractAEPartBase
if( saveType != PartItemStack.Wrench )
{
// Set the owner ID
data.setInteger( AbstractAEPartBase.NBT_KEY_OWNER, this.ownerID );
data.setInteger( ThEPartBase.NBT_KEY_OWNER, this.ownerID );
}
}
@@ -36,8 +36,8 @@ import appeng.tile.inventory.InvOperation;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public abstract class AbstractAEPartEssentiaIOBus
extends AbstractAEPartBase
public abstract class ThEPartEssentiaIOBus_Base
extends ThEPartBase
implements IGridTickable, IInventoryUpdateReceiver, IAspectSlotPart, IAEAppEngInventory
{
/**
@@ -83,24 +83,24 @@ public abstract class AbstractAEPartEssentiaIOBus
private boolean lastRedstone;
private int[] availableFilterSlots = { AbstractAEPartEssentiaIOBus.BASE_SLOT_INDEX };
private int[] availableFilterSlots = { ThEPartEssentiaIOBus_Base.BASE_SLOT_INDEX };
private UpgradeInventory upgradeInventory = new StackUpgradeInventory( this.associatedItem, this,
AbstractAEPartEssentiaIOBus.UPGRADE_INVENTORY_SIZE );
ThEPartEssentiaIOBus_Base.UPGRADE_INVENTORY_SIZE );
private List<ContainerPartEssentiaIOBus> listeners = new ArrayList<ContainerPartEssentiaIOBus>();
/**
* How the bus responds to redstone.
*/
private RedstoneMode redstoneMode = AbstractAEPartEssentiaIOBus.DEFAULT_REDSTONE_MODE;
private RedstoneMode redstoneMode = ThEPartEssentiaIOBus_Base.DEFAULT_REDSTONE_MODE;
/**
* Network source representing this part.
*/
protected MachineSource asMachineSource;
protected List<Aspect> filteredAspects = new ArrayList<Aspect>( AbstractAEPartEssentiaIOBus.MAX_FILTER_SIZE );
protected List<Aspect> filteredAspects = new ArrayList<Aspect>( ThEPartEssentiaIOBus_Base.MAX_FILTER_SIZE );
protected IAspectContainer facingContainer;
@@ -116,12 +116,12 @@ public abstract class AbstractAEPartEssentiaIOBus
private static final String NBT_KEY_REDSTONE_MODE = "redstoneMode", NBT_KEY_FILTER_NUMBER = "AspectFilter#",
NBT_KEY_UPGRADE_INV = "upgradeInventory";
public AbstractAEPartEssentiaIOBus( final AEPartsEnum associatedPart )
public ThEPartEssentiaIOBus_Base( final AEPartsEnum associatedPart )
{
super( associatedPart );
// Initialize the list
for( int index = 0; index < AbstractAEPartEssentiaIOBus.MAX_FILTER_SIZE; index++ )
for( int index = 0; index < ThEPartEssentiaIOBus_Base.MAX_FILTER_SIZE; index++ )
{
this.filteredAspects.add( null );
}
@@ -203,35 +203,35 @@ public abstract class AbstractAEPartEssentiaIOBus
this.availableFilterSlots = new int[1 + ( this.filterSize * 4 )];
// Add the base slot
this.availableFilterSlots[0] = AbstractAEPartEssentiaIOBus.BASE_SLOT_INDEX;
this.availableFilterSlots[0] = ThEPartEssentiaIOBus_Base.BASE_SLOT_INDEX;
if( this.filterSize < 2 )
{
// Reset tier 2 slots
for( int i = 0; i < AbstractAEPartEssentiaIOBus.TIER2_INDEXS.length; i++ )
for( int i = 0; i < ThEPartEssentiaIOBus_Base.TIER2_INDEXS.length; i++ )
{
this.filteredAspects.set( AbstractAEPartEssentiaIOBus.TIER2_INDEXS[i], null );
this.filteredAspects.set( ThEPartEssentiaIOBus_Base.TIER2_INDEXS[i], null );
}
if( this.filterSize < 1 )
{
// Reset tier 1 slots
for( int i = 0; i < AbstractAEPartEssentiaIOBus.TIER1_INDEXS.length; i++ )
for( int i = 0; i < ThEPartEssentiaIOBus_Base.TIER1_INDEXS.length; i++ )
{
this.filteredAspects.set( AbstractAEPartEssentiaIOBus.TIER1_INDEXS[i], null );
this.filteredAspects.set( ThEPartEssentiaIOBus_Base.TIER1_INDEXS[i], null );
}
}
else
{
// Tier 1 slots
System.arraycopy( AbstractAEPartEssentiaIOBus.TIER1_INDEXS, 0, this.availableFilterSlots, 1, 4 );
System.arraycopy( ThEPartEssentiaIOBus_Base.TIER1_INDEXS, 0, this.availableFilterSlots, 1, 4 );
}
}
else
{
// Add both
System.arraycopy( AbstractAEPartEssentiaIOBus.TIER1_INDEXS, 0, this.availableFilterSlots, 1, 4 );
System.arraycopy( AbstractAEPartEssentiaIOBus.TIER2_INDEXS, 0, this.availableFilterSlots, 5, 4 );
System.arraycopy( ThEPartEssentiaIOBus_Base.TIER1_INDEXS, 0, this.availableFilterSlots, 1, 4 );
System.arraycopy( ThEPartEssentiaIOBus_Base.TIER2_INDEXS, 0, this.availableFilterSlots, 5, 4 );
}
}
@@ -305,7 +305,7 @@ public abstract class AbstractAEPartEssentiaIOBus
}
// Add upgrades to drops
for( int slotIndex = 0; slotIndex < AbstractAEPartEssentiaIOBus.UPGRADE_INVENTORY_SIZE; slotIndex++ )
for( int slotIndex = 0; slotIndex < ThEPartEssentiaIOBus_Base.UPGRADE_INVENTORY_SIZE; slotIndex++ )
{
// Get the upgrade card in this slot
ItemStack slotStack = this.upgradeInventory.getStackInSlot( slotIndex );
@@ -326,7 +326,7 @@ public abstract class AbstractAEPartEssentiaIOBus
@Override
public double getIdlePowerUsage()
{
return AbstractAEPartEssentiaIOBus.IDLE_POWER_DRAIN;
return ThEPartEssentiaIOBus_Base.IDLE_POWER_DRAIN;
}
/**
@@ -539,20 +539,20 @@ public abstract class AbstractAEPartEssentiaIOBus
super.readFromNBT( data );
// Read redstone mode
if( data.hasKey( AbstractAEPartEssentiaIOBus.NBT_KEY_REDSTONE_MODE ) )
if( data.hasKey( ThEPartEssentiaIOBus_Base.NBT_KEY_REDSTONE_MODE ) )
{
this.redstoneMode = EnumCache.AE_REDSTONE_MODES[data.getInteger( AbstractAEPartEssentiaIOBus.NBT_KEY_REDSTONE_MODE )];
this.redstoneMode = EnumCache.AE_REDSTONE_MODES[data.getInteger( ThEPartEssentiaIOBus_Base.NBT_KEY_REDSTONE_MODE )];
}
// Read filters
for( int index = 0; index < AbstractAEPartEssentiaIOBus.MAX_FILTER_SIZE; index++ )
for( int index = 0; index < ThEPartEssentiaIOBus_Base.MAX_FILTER_SIZE; index++ )
{
if( data.hasKey( AbstractAEPartEssentiaIOBus.NBT_KEY_FILTER_NUMBER + index ) )
if( data.hasKey( ThEPartEssentiaIOBus_Base.NBT_KEY_FILTER_NUMBER + index ) )
{
Aspect filterAspect = null;
// Get the name of the aspect
String aspectTag = data.getString( AbstractAEPartEssentiaIOBus.NBT_KEY_FILTER_NUMBER + index );
String aspectTag = data.getString( ThEPartEssentiaIOBus_Base.NBT_KEY_FILTER_NUMBER + index );
if( !aspectTag.equals( "" ) )
{
filterAspect = Aspect.aspects.get( aspectTag );
@@ -564,9 +564,9 @@ public abstract class AbstractAEPartEssentiaIOBus
}
// Read upgrade inventory
if( data.hasKey( AbstractAEPartEssentiaIOBus.NBT_KEY_UPGRADE_INV ) )
if( data.hasKey( ThEPartEssentiaIOBus_Base.NBT_KEY_UPGRADE_INV ) )
{
this.upgradeInventory.readFromNBT( data, AbstractAEPartEssentiaIOBus.NBT_KEY_UPGRADE_INV );
this.upgradeInventory.readFromNBT( data, ThEPartEssentiaIOBus_Base.NBT_KEY_UPGRADE_INV );
this.onInventoryChanged( this.upgradeInventory );
}
@@ -633,13 +633,13 @@ public abstract class AbstractAEPartEssentiaIOBus
super.writeToNBT( data, saveType );
// Write the redstone mode
if( this.redstoneMode != AbstractAEPartEssentiaIOBus.DEFAULT_REDSTONE_MODE )
if( this.redstoneMode != ThEPartEssentiaIOBus_Base.DEFAULT_REDSTONE_MODE )
{
data.setInteger( AbstractAEPartEssentiaIOBus.NBT_KEY_REDSTONE_MODE, this.redstoneMode.ordinal() );
data.setInteger( ThEPartEssentiaIOBus_Base.NBT_KEY_REDSTONE_MODE, this.redstoneMode.ordinal() );
}
// Write each filter
for( int i = 0; i < AbstractAEPartEssentiaIOBus.MAX_FILTER_SIZE; i++ )
for( int i = 0; i < ThEPartEssentiaIOBus_Base.MAX_FILTER_SIZE; i++ )
{
Aspect aspect = this.filteredAspects.get( i );
String aspectTag = "";
@@ -649,13 +649,13 @@ public abstract class AbstractAEPartEssentiaIOBus
aspectTag = aspect.getTag();
}
data.setString( AbstractAEPartEssentiaIOBus.NBT_KEY_FILTER_NUMBER + i, aspectTag );
data.setString( ThEPartEssentiaIOBus_Base.NBT_KEY_FILTER_NUMBER + i, aspectTag );
}
// Write the upgrade inventory
if( !this.upgradeInventory.isEmpty() )
{
this.upgradeInventory.writeToNBT( data, AbstractAEPartEssentiaIOBus.NBT_KEY_UPGRADE_INV );
this.upgradeInventory.writeToNBT( data, ThEPartEssentiaIOBus_Base.NBT_KEY_UPGRADE_INV );
}
}
}
@@ -12,8 +12,8 @@ import thaumicenergistics.common.utils.EffectiveSide;
import appeng.api.parts.PartItemStack;
import appeng.util.Platform;
public abstract class AbstractAEPartRotateable
extends AbstractAEPartBase
public abstract class ThERotateablePart
extends ThEPartBase
{
/**
* NBT keys
@@ -26,7 +26,7 @@ public abstract class AbstractAEPartRotateable
*/
private byte renderRotation = 0;
public AbstractAEPartRotateable( final AEPartsEnum associatedPart )
public ThERotateablePart( final AEPartsEnum associatedPart )
{
super( associatedPart );
}
@@ -100,9 +100,9 @@ public abstract class AbstractAEPartRotateable
super.readFromNBT( data );
// Read rotation
if( data.hasKey( AbstractAEPartRotateable.NBT_KEY_ROT_DIR ) )
if( data.hasKey( ThERotateablePart.NBT_KEY_ROT_DIR ) )
{
this.renderRotation = data.getByte( AbstractAEPartRotateable.NBT_KEY_ROT_DIR );
this.renderRotation = data.getByte( ThERotateablePart.NBT_KEY_ROT_DIR );
}
}
@@ -142,7 +142,7 @@ public abstract class AbstractAEPartRotateable
// Write the rotation
if( this.renderRotation != 0 )
{
data.setByte( AbstractAEPartRotateable.NBT_KEY_ROT_DIR, this.renderRotation );
data.setByte( ThERotateablePart.NBT_KEY_ROT_DIR, this.renderRotation );
}
}
@@ -12,29 +12,29 @@ import appeng.api.config.Upgrades;
public enum AEPartsEnum
{
EssentiaImportBus (ThEStrings.Part_EssentiaImportBus, AEPartEssentiaImportBus.class, ThaumicEnergistics.MOD_ID + ".group.essentia.transport",
EssentiaImportBus (ThEStrings.Part_EssentiaImportBus, PartEssentiaImportBus.class, ThaumicEnergistics.MOD_ID + ".group.essentia.transport",
generatePair( Upgrades.CAPACITY, 2 ), generatePair( Upgrades.REDSTONE, 1 ), generatePair( Upgrades.SPEED, 2 )),
EssentiaLevelEmitter (ThEStrings.Part_EssentiaLevelEmitter, AEPartEssentiaLevelEmitter.class),
EssentiaLevelEmitter (ThEStrings.Part_EssentiaLevelEmitter, PartEssentiaLevelEmitter.class),
EssentiaStorageBus (ThEStrings.Part_EssentiaStorageBus, AEPartEssentiaStorageBus.class, null, generatePair( Upgrades.INVERTER, 1 )),
EssentiaStorageBus (ThEStrings.Part_EssentiaStorageBus, PartEssentiaStorageBus.class, null, generatePair( Upgrades.INVERTER, 1 )),
EssentiaExportBus (ThEStrings.Part_EssentiaExportBus, AEPartEssentiaExportBus.class, ThaumicEnergistics.MOD_ID + ".group.essentia.transport",
EssentiaExportBus (ThEStrings.Part_EssentiaExportBus, PartEssentiaExportBus.class, ThaumicEnergistics.MOD_ID + ".group.essentia.transport",
generatePair( Upgrades.CAPACITY, 2 ), generatePair( Upgrades.REDSTONE, 1 ), generatePair( Upgrades.SPEED, 2 )),
EssentiaTerminal (ThEStrings.Part_EssentiaTerminal, AEPartEssentiaTerminal.class),
EssentiaTerminal (ThEStrings.Part_EssentiaTerminal, PartEssentiaTerminal.class),
ArcaneCraftingTerminal (ThEStrings.Part_ArcaneCraftingTerminal, AEPartArcaneCraftingTerminal.class),
ArcaneCraftingTerminal (ThEStrings.Part_ArcaneCraftingTerminal, PartArcaneCraftingTerminal.class),
VisInterface (ThEStrings.Part_VisRelayInterface, AEPartVisInterface.class),
VisInterface (ThEStrings.Part_VisRelayInterface, PartVisInterface.class),
EssentiaStorageMonitor (ThEStrings.Part_EssentiaStorageMonitor, AEPartEssentiaStorageMonitor.class),
EssentiaStorageMonitor (ThEStrings.Part_EssentiaStorageMonitor, PartEssentiaStorageMonitor.class),
EssentiaConversionMonitor (ThEStrings.Part_EssentiaConversionMonitor, AEPartEssentiaConversionMonitor.class);
EssentiaConversionMonitor (ThEStrings.Part_EssentiaConversionMonitor, PartEssentiaConversionMonitor.class);
private ThEStrings unlocalizedName;
private Class<? extends AbstractAEPartBase> partClass;
private Class<? extends ThEPartBase> partClass;
private String groupName;
@@ -45,12 +45,12 @@ public enum AEPartsEnum
*/
public static final AEPartsEnum[] VALUES = AEPartsEnum.values();
private AEPartsEnum( final ThEStrings unlocalizedName, final Class<? extends AbstractAEPartBase> partClass )
private AEPartsEnum( final ThEStrings unlocalizedName, final Class<? extends ThEPartBase> partClass )
{
this( unlocalizedName, partClass, null );
}
private AEPartsEnum( final ThEStrings unlocalizedName, final Class<? extends AbstractAEPartBase> partClass, final String groupName )
private AEPartsEnum( final ThEStrings unlocalizedName, final Class<? extends ThEPartBase> partClass, final String groupName )
{
// Set the localization string
this.unlocalizedName = unlocalizedName;
@@ -62,7 +62,7 @@ public enum AEPartsEnum
this.groupName = groupName;
}
private AEPartsEnum( final ThEStrings unlocalizedName, final Class<? extends AbstractAEPartBase> partClass, final String groupName,
private AEPartsEnum( final ThEStrings unlocalizedName, final Class<? extends ThEPartBase> partClass, final String groupName,
final Pair<Upgrades, Integer> ... upgrades )
{
this( unlocalizedName, partClass, groupName );
@@ -95,7 +95,7 @@ public enum AEPartsEnum
return AEPartsEnum.VALUES[clamped];
}
public static int getPartID( final Class<? extends AbstractAEPartBase> partClass )
public static int getPartID( final Class<? extends ThEPartBase> partClass )
{
int id = -1;
@@ -116,10 +116,10 @@ public enum AEPartsEnum
}
public AbstractAEPartBase createPartInstance( final ItemStack itemStack ) throws InstantiationException, IllegalAccessException
public ThEPartBase createPartInstance( final ItemStack itemStack ) throws InstantiationException, IllegalAccessException
{
// Create a new instance of the part
AbstractAEPartBase part = this.partClass.newInstance();
ThEPartBase part = this.partClass.newInstance();
// Setup based on the itemStack
part.setupPartFromItem( itemStack );
@@ -149,7 +149,7 @@ public enum AEPartsEnum
*
* @return
*/
public Class<? extends AbstractAEPartBase> getPartClass()
public Class<? extends ThEPartBase> getPartClass()
{
return this.partClass;
}
@@ -0,0 +1,122 @@
package thaumicenergistics.common.storage;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import thaumicenergistics.common.registries.ItemEnum;
import thaumicenergistics.common.registries.ThEStrings;
/**
* The types of essentia storage.
*
* @author Nividica
*
*/
public enum EnumEssentiaStorageTypes
{
Type_1K (0, 1024, 12, "1k", EnumRarity.common, 0.5, ThEStrings.Item_EssentiaCell_1k, ThEStrings.Item_StorageComponent_1k),
Type_4K (1, 4096, 12, "4k", EnumRarity.uncommon, 1.0, ThEStrings.Item_EssentiaCell_4k, ThEStrings.Item_StorageComponent_4k),
Type_16K (2, 16348, 12, "16k", EnumRarity.uncommon, 1.5, ThEStrings.Item_EssentiaCell_16k, ThEStrings.Item_StorageComponent_16k),
Type_64K (3, 65536, 12, "64k", EnumRarity.rare, 2.0, ThEStrings.Item_EssentiaCell_64k, ThEStrings.Item_StorageComponent_64k),
Type_Creative (4, 0, 63, "creative", EnumRarity.epic, 0.0, ThEStrings.Item_EssentiaCell_Creative, null);
/**
* Array of values whose index matches the types index.
*/
public static final EnumEssentiaStorageTypes fromIndex[];
/**
* Index of the type.
*/
public final int index;
/**
* Displayable suffix of the type.
*/
public final String suffix;
/**
* Capacity of the type, in bytes.
*/
public final int capacity;
/**
* Rarity class of the type.
*/
public final EnumRarity rarity;
/**
* Maximum number of stored types.
*/
public final int maxStoredTypes;
/**
* Amount of power drained while the cell is active.
*/
public final double idleAEPowerDrain;
/**
* Name of the cell for this type.
*/
public final ThEStrings cellName;
/**
* Name of the component for this type.
* The creative cell does not have a component.
*/
public final ThEStrings componentName;
/**
* This is to ensure that the index can be independent of the ordinal.
* Since the data is saved based on index, not ordinal.
*/
static
{
// Setup the array
fromIndex = new EnumEssentiaStorageTypes[5];
fromIndex[Type_1K.index] = Type_1K;
fromIndex[Type_4K.index] = Type_4K;
fromIndex[Type_16K.index] = Type_16K;
fromIndex[Type_64K.index] = Type_64K;
fromIndex[Type_Creative.index] = Type_Creative;
}
private EnumEssentiaStorageTypes( final int index, final int capacity, final int maxStoredTypes,
final String suffix, final EnumRarity rarity, final double aeDrain,
final ThEStrings cellName, final ThEStrings componentName )
{
this.index = index;
this.capacity = capacity;
this.suffix = suffix;
this.rarity = rarity;
this.maxStoredTypes = maxStoredTypes;
this.idleAEPowerDrain = aeDrain;
this.cellName = cellName;
this.componentName = componentName;
}
/**
* Returns an empty cell for this type.
*
* @return
*/
public ItemStack getCell()
{
return ItemEnum.ESSENTIA_CELL.getDMGStack( this.index );
}
/**
* Returns a storage component for this type.
* The creative type has no component, null is returned.
*
* @param stackSize
* @return
*/
public ItemStack getComponent( final int stackSize )
{
if( this == Type_Creative )
{
return null;
}
return ItemEnum.STORAGE_COMPONENT.getDMGStack( this.index, stackSize );
}
}
@@ -1,26 +1,34 @@
package thaumicenergistics.implementaion;
import thaumicenergistics.api.IThEItems;
import thaumicenergistics.common.items.EssentiaStorageBase;
import thaumicenergistics.common.items.ItemMaterial.MaterialTypes;
import thaumicenergistics.common.registries.ItemEnum;
import thaumicenergistics.common.storage.EnumEssentiaStorageTypes;
class ThEItems
extends IThEItems
{
ThEItems()
{
// Cores
this.CoalescenceCore = new ThEItemDescription( MaterialTypes.COALESCENCE_CORE.getStack() );
this.DiffusionCore = new ThEItemDescription( MaterialTypes.DIFFUSION_CORE.getStack() );
this.EssentiaCell_16k = new ThEItemDescription( ItemEnum.ESSENTIA_CELL.getDMGStack( EssentiaStorageBase.INDEX_16K ) );
this.EssentiaCell_1k = new ThEItemDescription( ItemEnum.ESSENTIA_CELL.getDMGStack( EssentiaStorageBase.INDEX_1K ) );
this.EssentiaCell_4k = new ThEItemDescription( ItemEnum.ESSENTIA_CELL.getDMGStack( EssentiaStorageBase.INDEX_4K ) );
this.EssentiaCell_64k = new ThEItemDescription( ItemEnum.ESSENTIA_CELL.getDMGStack( EssentiaStorageBase.INDEX_64K ) );
// Cells
this.EssentiaCell_1k = new ThEItemDescription( EnumEssentiaStorageTypes.Type_1K.getCell() );
this.EssentiaCell_4k = new ThEItemDescription( EnumEssentiaStorageTypes.Type_4K.getCell() );
this.EssentiaCell_16k = new ThEItemDescription( EnumEssentiaStorageTypes.Type_16K.getCell() );
this.EssentiaCell_64k = new ThEItemDescription( EnumEssentiaStorageTypes.Type_64K.getCell() );
this.EssentiaCell_Creative = new ThEItemDescription( EnumEssentiaStorageTypes.Type_Creative.getCell() );
this.EssentiaCell_Casing = new ThEItemDescription( ItemEnum.STORAGE_CASING.getStack() );
this.EssentiaStorageComponent_16k = new ThEItemDescription( ItemEnum.STORAGE_COMPONENT.getDMGStack( EssentiaStorageBase.INDEX_16K ) );
this.EssentiaStorageComponent_1k = new ThEItemDescription( ItemEnum.STORAGE_COMPONENT.getDMGStack( EssentiaStorageBase.INDEX_1K ) );
this.EssentiaStorageComponent_4k = new ThEItemDescription( ItemEnum.STORAGE_COMPONENT.getDMGStack( EssentiaStorageBase.INDEX_4K ) );
this.EssentiaStorageComponent_64k = new ThEItemDescription( ItemEnum.STORAGE_COMPONENT.getDMGStack( EssentiaStorageBase.INDEX_64K ) );
// Components
this.EssentiaStorageComponent_1k = new ThEItemDescription( EnumEssentiaStorageTypes.Type_1K.getComponent( 1 ) );
this.EssentiaStorageComponent_4k = new ThEItemDescription( EnumEssentiaStorageTypes.Type_4K.getComponent( 1 ) );
this.EssentiaStorageComponent_16k = new ThEItemDescription( EnumEssentiaStorageTypes.Type_16K.getComponent( 1 ) );
this.EssentiaStorageComponent_64k = new ThEItemDescription( EnumEssentiaStorageTypes.Type_64K.getComponent( 1 ) );
// Misc
this.IronGear = new ThEItemDescription( MaterialTypes.IRON_GEAR.getStack() );
this.WirelessEssentiaTerminal = new ThEItemDescription( ItemEnum.WIRELESS_TERMINAL.getStack() );
this.KnowledgeCore = new ThEItemDescription( ItemEnum.KNOWLEDGE_CORE.getStack() );
@@ -6,7 +6,7 @@ import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.visnet.TileVisNode;
import thaumcraft.api.visnet.VisNetHandler;
import thaumcraft.common.tiles.TileVisRelay;
import thaumicenergistics.common.parts.AEPartVisInterface;
import thaumicenergistics.common.parts.PartVisInterface;
import appeng.api.util.DimensionalCoord;
public class VisProviderProxy
@@ -20,7 +20,7 @@ public class VisProviderProxy
/**
* The interface associated with this source.
*/
private AEPartVisInterface visInterface;
private PartVisInterface visInterface;
/**
* Where in the world this provider is.
@@ -32,7 +32,7 @@ public class VisProviderProxy
*/
private byte attunement = -1;
public VisProviderProxy( final AEPartVisInterface parent )
public VisProviderProxy( final PartVisInterface parent )
{
// Set the interface
this.visInterface = parent;
@@ -93,7 +93,7 @@ thaumicenergistics.research_page.TECORES.2=§lDiffusion Core§r<BR>The relativel
tc.research_name.thaumicenergistics.TESTORAGE=Digi-sentia Storage
tc.research_text.thaumicenergistics.TESTORAGE=Can this thing really store essentia?
thaumicenergistics.research_page.TESTORAGE.1=Upon inspecting existing digital storage mediums you have concluded that you can in-fact store digitized essentia.<BR>By infusing §lCertus Quartz§r with concentrated essence, it will gain the ability to store the essentia, which remains remarkably active even in digital form.<BR>You conclude that the higher the concentration of essence, the more it should be able to store, although there are inherit limits as to how much the quartz itself can store.
thaumicenergistics.research_page.TESTORAGE.2=§lComponents§r<BR>Stores the essentia in its digital format. Non-operational unless a cell casing is used to interface with a digital network.<BR>§lCell Casing§r<BR>Provides an interface and protects a storage component.<BR>§lEssentia Cell Workbench§r<BR>The cell workbench allows you to partition a cell, specifying what essentia types are allowed to be stored.
thaumicenergistics.research_page.TESTORAGE.2=§lComponents§r<BR>Stores the essentia in its digital format. Non-operational unless a cell housing is used to interface with a digital network.<BR>§lCell Housing§r<BR>Provides an interface and protects a storage component.<BR>§lEssentia Cell Workbench§r<BR>The cell workbench allows you to partition a cell, specifying what essentia types are allowed to be stored.
# Research IO
tc.research_name.thaumicenergistics.TEIO=Digi-sentia Transportation