Large chunk on the pattern terminal.
This commit is contained in:
@@ -14,43 +14,45 @@ import appeng.tile.inventory.InvOperation;
|
||||
public class PartPatternTerminal extends PartTerminal implements IAEAppEngInventory
|
||||
{
|
||||
|
||||
AppEngInternalInventory craftingGrid = new AppEngInternalInventory( this, 9 + 3 );
|
||||
AppEngInternalInventory pattern = new AppEngInternalInventory( this, 1 );
|
||||
AppEngInternalInventory crafting = new AppEngInternalInventory( this, 9 );
|
||||
AppEngInternalInventory output = new AppEngInternalInventory( this, 3 );
|
||||
AppEngInternalInventory pattern = new AppEngInternalInventory( this, 2 );
|
||||
|
||||
public boolean craftingMode = true;
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound data)
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
data.setBoolean( "craftingMode", craftingMode );
|
||||
pattern.writeToNBT( data, "pattern" );
|
||||
craftingGrid.writeToNBT( data, "craftingGrid" );
|
||||
output.writeToNBT( data, "outputList" );
|
||||
crafting.writeToNBT( data, "craftingGrid" );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound data)
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
craftingMode = data.getBoolean( "craftingMode" );
|
||||
pattern.readFromNBT( data, "pattern" );
|
||||
craftingGrid.readFromNBT( data, "craftingGrid" );
|
||||
output.readFromNBT( data, "outputList" );
|
||||
crafting.readFromNBT( data, "craftingGrid" );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getDrops(List<ItemStack> drops, boolean wrenched)
|
||||
{
|
||||
for (ItemStack is : craftingGrid)
|
||||
if ( is != null )
|
||||
drops.add( is );
|
||||
|
||||
for (ItemStack is : pattern)
|
||||
if ( is != null )
|
||||
drops.add( is );
|
||||
}
|
||||
|
||||
public PartPatternTerminal(ItemStack is) {
|
||||
super( PartPatternTerminal.class, is, true );
|
||||
super( PartPatternTerminal.class, is );
|
||||
frontBright = CableBusTextures.PartPatternTerm_Bright;
|
||||
frontColored = CableBusTextures.PartPatternTerm_Colored;
|
||||
frontDark = CableBusTextures.PartPatternTerm_Dark;
|
||||
// frontSolid = CableBusTextures.PartPatternTerm_Solid;
|
||||
}
|
||||
|
||||
public GuiBridge getGui()
|
||||
@@ -62,9 +64,14 @@ public class PartPatternTerminal extends PartTerminal implements IAEAppEngInvent
|
||||
public IInventory getInventoryByName(String name)
|
||||
{
|
||||
if ( name.equals( "crafting" ) )
|
||||
return craftingGrid;
|
||||
return crafting;
|
||||
|
||||
if ( name.equals( "output" ) )
|
||||
return output;
|
||||
|
||||
if ( name.equals( "pattern" ) )
|
||||
return pattern;
|
||||
|
||||
return super.getInventoryByName( name );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user