implement pattern expansion cards for interfaces
Maximum of 4 rows Uses 4x the previous tier for crafting operations (4 rows = 64 interfaces consumption)
This commit is contained in:
@@ -46,7 +46,8 @@ public enum Upgrades
|
|||||||
*/
|
*/
|
||||||
FUZZY( 1 ),
|
FUZZY( 1 ),
|
||||||
SPEED( 1 ),
|
SPEED( 1 ),
|
||||||
INVERTER( 1 );
|
INVERTER( 1 ),
|
||||||
|
PATTERN_EXPANSION(1);
|
||||||
|
|
||||||
private final int tier;
|
private final int tier;
|
||||||
private final Map<ItemStack, Integer> supportedMax = new HashMap<>();
|
private final Map<ItemStack, Integer> supportedMax = new HashMap<>();
|
||||||
|
|||||||
@@ -89,6 +89,8 @@ public interface IMaterials
|
|||||||
|
|
||||||
IItemDefinition cardCapacity();
|
IItemDefinition cardCapacity();
|
||||||
|
|
||||||
|
IItemDefinition cardPatternExpansion();
|
||||||
|
|
||||||
IItemDefinition cardFuzzy();
|
IItemDefinition cardFuzzy();
|
||||||
|
|
||||||
IItemDefinition cardInverter();
|
IItemDefinition cardInverter();
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public class GuiInterface extends GuiUpgradeable
|
|||||||
public GuiInterface( final InventoryPlayer inventoryPlayer, final IInterfaceHost te )
|
public GuiInterface( final InventoryPlayer inventoryPlayer, final IInterfaceHost te )
|
||||||
{
|
{
|
||||||
super( new ContainerInterface( inventoryPlayer, te ) );
|
super( new ContainerInterface( inventoryPlayer, te ) );
|
||||||
this.ySize = 211;
|
this.ySize = 256;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -62,8 +62,7 @@ public class GuiInterface extends GuiUpgradeable
|
|||||||
this.BlockMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.BLOCK, YesNo.NO );
|
this.BlockMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.BLOCK, YesNo.NO );
|
||||||
this.buttonList.add( this.BlockMode );
|
this.buttonList.add( this.BlockMode );
|
||||||
|
|
||||||
this.interfaceMode = new GuiToggleButton( this.guiLeft - 18, this.guiTop + 26, 84, 85, GuiText.InterfaceTerminal
|
this.interfaceMode = new GuiToggleButton( this.guiLeft - 18, this.guiTop + 26, 84, 85, GuiText.InterfaceTerminal.getLocal(), GuiText.InterfaceTerminalHint.getLocal() );
|
||||||
.getLocal(), GuiText.InterfaceTerminalHint.getLocal() );
|
|
||||||
this.buttonList.add( this.interfaceMode );
|
this.buttonList.add( this.interfaceMode );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,13 +85,20 @@ public class GuiInterface extends GuiUpgradeable
|
|||||||
this.fontRenderer.drawString( GuiText.StoredItems.getLocal(), 8, 6 + 60 + 7, 4210752 );
|
this.fontRenderer.drawString( GuiText.StoredItems.getLocal(), 8, 6 + 60 + 7, 4210752 );
|
||||||
this.fontRenderer.drawString( GuiText.Patterns.getLocal(), 8, 6 + 73 + 7, 4210752 );
|
this.fontRenderer.drawString( GuiText.Patterns.getLocal(), 8, 6 + 73 + 7, 4210752 );
|
||||||
|
|
||||||
this.fontRenderer.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getBackground()
|
protected String getBackground()
|
||||||
{
|
{
|
||||||
return "guis/interface.png";
|
int upgrades = ( (ContainerInterface) this.cvb ).getPatternUpgrades();
|
||||||
|
if( upgrades == 0 )
|
||||||
|
{
|
||||||
|
return "guis/newinterface.png";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "guis/newinterface" + upgrades + ".png";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -117,4 +123,5 @@ public class GuiInterface extends GuiUpgradeable
|
|||||||
NetworkHandler.instance().sendToServer( new PacketConfigButton( this.BlockMode.getSetting(), backwards ) );
|
NetworkHandler.instance().sendToServer( new PacketConfigButton( this.BlockMode.getSetting(), backwards ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,8 +24,13 @@ import java.util.*;
|
|||||||
|
|
||||||
import appeng.api.config.ActionItems;
|
import appeng.api.config.ActionItems;
|
||||||
import appeng.api.config.Settings;
|
import appeng.api.config.Settings;
|
||||||
|
import appeng.api.config.Upgrades;
|
||||||
import appeng.client.gui.widgets.GuiImgButton;
|
import appeng.client.gui.widgets.GuiImgButton;
|
||||||
import appeng.core.worlddata.IWorldPlayerMapping;
|
import appeng.core.worlddata.IWorldPlayerMapping;
|
||||||
|
import appeng.helpers.DualityInterface;
|
||||||
|
import appeng.parts.misc.PartInterface;
|
||||||
|
import appeng.tile.inventory.AppEngInternalInventory;
|
||||||
|
import appeng.tile.misc.TileInterface;
|
||||||
import appeng.util.BlockPosUtils;
|
import appeng.util.BlockPosUtils;
|
||||||
import com.google.common.collect.HashMultimap;
|
import com.google.common.collect.HashMultimap;
|
||||||
|
|
||||||
@@ -69,6 +74,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
|||||||
private final HashMultimap<String, ClientDCInternalInv> byName = HashMultimap.create();
|
private final HashMultimap<String, ClientDCInternalInv> byName = HashMultimap.create();
|
||||||
private final HashMap<ClientDCInternalInv,BlockPos> blockPosHashMap = new HashMap<>();
|
private final HashMap<ClientDCInternalInv,BlockPos> blockPosHashMap = new HashMap<>();
|
||||||
private final HashMap<GuiButton,ClientDCInternalInv> guiButtonHashMap = new HashMap<>();
|
private final HashMap<GuiButton,ClientDCInternalInv> guiButtonHashMap = new HashMap<>();
|
||||||
|
private final Map<ClientDCInternalInv,Integer> numUpgradesMap = new HashMap<>();
|
||||||
private final ArrayList<String> names = new ArrayList<>();
|
private final ArrayList<String> names = new ArrayList<>();
|
||||||
private final ArrayList<Object> lines = new ArrayList<>();
|
private final ArrayList<Object> lines = new ArrayList<>();
|
||||||
private final Set<Object> matchedStacks = new HashSet<>();
|
private final Set<Object> matchedStacks = new HashSet<>();
|
||||||
@@ -91,7 +97,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
|||||||
final GuiScrollbar scrollbar = new GuiScrollbar();
|
final GuiScrollbar scrollbar = new GuiScrollbar();
|
||||||
this.setScrollBar( scrollbar );
|
this.setScrollBar( scrollbar );
|
||||||
this.xSize = 208;
|
this.xSize = 208;
|
||||||
this.ySize = 256;
|
this.ySize = 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -136,36 +142,43 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
|||||||
this.fontRenderer.drawString( this.getGuiDisplayName( GuiText.InterfaceTerminal.getLocal() ), 8, 6, 4210752 );
|
this.fontRenderer.drawString( this.getGuiDisplayName( GuiText.InterfaceTerminal.getLocal() ), 8, 6, 4210752 );
|
||||||
this.fontRenderer.drawString( GuiText.inventory.getLocal(), this.offsetX + 2, this.ySize - 96 + 3, 4210752 );
|
this.fontRenderer.drawString( GuiText.inventory.getLocal(), this.offsetX + 2, this.ySize - 96 + 3, 4210752 );
|
||||||
|
|
||||||
final int ex = this.getScrollBar().getCurrentScroll();
|
final int currentScroll = this.getScrollBar().getCurrentScroll();
|
||||||
|
|
||||||
this.guiButtonNextAssembler = new GuiImgButton(guiLeft + 123, guiTop + 25,Settings.ACTIONS, ActionItems.FREE_MOLECULAR_SLOT_SHORTCUT);
|
this.guiButtonNextAssembler = new GuiImgButton( guiLeft + 123, guiTop + 25, Settings.ACTIONS, ActionItems.FREE_MOLECULAR_SLOT_SHORTCUT );
|
||||||
this.buttonList.add( guiButtonNextAssembler );
|
this.buttonList.add( guiButtonNextAssembler );
|
||||||
|
|
||||||
guiButtonHide = new GuiImgButton( guiLeft + 141, guiTop + 25,Settings.ACTIONS, this.partInterfaceTerminal.onlyInterfacesWithFreeSlots ?
|
guiButtonHide = new GuiImgButton( guiLeft + 141, guiTop + 25, Settings.ACTIONS, this.partInterfaceTerminal.onlyInterfacesWithFreeSlots ? ActionItems.TOGGLE_SHOW_FULL_INTERFACES_OFF : ActionItems.TOGGLE_SHOW_FULL_INTERFACES_ON );
|
||||||
ActionItems.TOGGLE_SHOW_FULL_INTERFACES_OFF :
|
|
||||||
ActionItems.TOGGLE_SHOW_FULL_INTERFACES_ON);
|
|
||||||
this.buttonList.add( guiButtonHide );
|
this.buttonList.add( guiButtonHide );
|
||||||
|
|
||||||
this.inventorySlots.inventorySlots.removeIf( slot -> slot instanceof SlotDisconnected );
|
this.inventorySlots.inventorySlots.removeIf( slot -> slot instanceof SlotDisconnected );
|
||||||
|
|
||||||
int offset = 51;
|
int offset = 52;
|
||||||
for( int x = 0; x < LINES_ON_PAGE && ex + x < this.lines.size(); x++ )
|
int linesDraw = 0;
|
||||||
|
for( int x = 0; x < LINES_ON_PAGE && linesDraw < LINES_ON_PAGE && currentScroll + x < this.lines.size(); x++ )
|
||||||
{
|
{
|
||||||
final Object lineObj = this.lines.get( ex + x );
|
final Object lineObj = this.lines.get( currentScroll + x );
|
||||||
if( lineObj instanceof ClientDCInternalInv )
|
if( lineObj instanceof ClientDCInternalInv )
|
||||||
{
|
{
|
||||||
final ClientDCInternalInv inv = (ClientDCInternalInv) lineObj;
|
final ClientDCInternalInv inv = (ClientDCInternalInv) lineObj;
|
||||||
for( int z = 0; z < inv.getInventory().getSlots(); z++ )
|
|
||||||
{
|
|
||||||
this.inventorySlots.inventorySlots.add( new SlotDisconnected( inv, z, z * 18 + 22, 1 + offset ) );
|
|
||||||
if (this.matchedStacks.contains(inv.getInventory().getStackInSlot(z)))
|
|
||||||
drawRect( z * 18 + 22, 1 + offset, z * 18 + 22 + 16, 1 + offset + 16, 0x2A00FF00 );
|
|
||||||
}
|
|
||||||
|
|
||||||
GuiButton guiButton = new GuiImgButton(guiLeft + 4, guiTop + offset + 1, Settings.ACTIONS, ActionItems.HIGHLIGHT_INTERFACE);
|
GuiButton guiButton = new GuiImgButton( guiLeft + 4, guiTop + offset, Settings.ACTIONS, ActionItems.HIGHLIGHT_INTERFACE );
|
||||||
guiButtonHashMap.put( guiButton , inv);
|
guiButtonHashMap.put( guiButton, inv );
|
||||||
this.buttonList.add( guiButton );
|
this.buttonList.add( guiButton );
|
||||||
|
int extraLines = numUpgradesMap.get( inv );
|
||||||
|
|
||||||
|
for( int row = 0; row < 1 + extraLines && linesDraw < LINES_ON_PAGE ; ++row )
|
||||||
|
{
|
||||||
|
for( int z = 0; z < 9 ; z++ )
|
||||||
|
{
|
||||||
|
this.inventorySlots.inventorySlots.add( new SlotDisconnected( inv, z + ( row * 9 ), ( z * 18 + 22 ), offset ) );
|
||||||
|
if( this.matchedStacks.contains( inv.getInventory().getStackInSlot( z + ( row * 9 ) ) ) )
|
||||||
|
{
|
||||||
|
drawRect( z * 18 + 22, offset, z * 18 + 22 + 16, offset + 16, 0x2A00FF00 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
linesDraw++;
|
||||||
|
offset += 18;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if( lineObj instanceof String )
|
else if( lineObj instanceof String )
|
||||||
{
|
{
|
||||||
@@ -176,17 +189,17 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
|||||||
name = name + " (" + rows + ')';
|
name = name + " (" + rows + ')';
|
||||||
}
|
}
|
||||||
|
|
||||||
while( name.length() > 2 && this.fontRenderer.getStringWidth( name ) > 155 )
|
while ( name.length() > 2 && this.fontRenderer.getStringWidth( name ) > 155 )
|
||||||
{
|
{
|
||||||
name = name.substring( 0, name.length() - 1 );
|
name = name.substring( 0, name.length() - 1 );
|
||||||
}
|
}
|
||||||
|
this.fontRenderer.drawString( name, this.offsetX + 2, 5 + offset, 4210752 );
|
||||||
this.fontRenderer.drawString( name, this.offsetX + 2, 6 + offset, 4210752 );
|
linesDraw++;
|
||||||
|
offset += 18;
|
||||||
}
|
}
|
||||||
offset += 18;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( searchFieldInputs.isMouseIn( mouseX , mouseY ) ) drawTooltip( Mouse.getEventX() * this.width / this.mc.displayWidth - offsetX, mouseY - guiTop, "Inputs OR names" );
|
if( searchFieldInputs.isMouseIn( mouseX, mouseY ) ) drawTooltip( Mouse.getEventX() * this.width / this.mc.displayWidth - offsetX, mouseY - guiTop, "Inputs OR names" );
|
||||||
else if( searchFieldOutputs.isMouseIn( mouseX, mouseY ) ) drawTooltip( Mouse.getEventX() * this.width / this.mc.displayWidth - offsetX, mouseY - guiTop, "Outputs OR names" );
|
else if( searchFieldOutputs.isMouseIn( mouseX, mouseY ) ) drawTooltip( Mouse.getEventX() * this.width / this.mc.displayWidth - offsetX, mouseY - guiTop, "Outputs OR names" );
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -264,19 +277,28 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
|||||||
|
|
||||||
int offset = 51;
|
int offset = 51;
|
||||||
final int ex = this.getScrollBar().getCurrentScroll();
|
final int ex = this.getScrollBar().getCurrentScroll();
|
||||||
|
int linesDraw = 0;
|
||||||
for( int x = 0; x < LINES_ON_PAGE && ex + x < this.lines.size(); x++ )
|
for( int x = 0; x < LINES_ON_PAGE && linesDraw < LINES_ON_PAGE && ex + x < this.lines.size(); x++ )
|
||||||
{
|
{
|
||||||
final Object lineObj = this.lines.get( ex + x );
|
final Object lineObj = this.lines.get( ex + x );
|
||||||
if( lineObj instanceof ClientDCInternalInv )
|
if( lineObj instanceof ClientDCInternalInv )
|
||||||
{
|
{
|
||||||
final ClientDCInternalInv inv = (ClientDCInternalInv) lineObj;
|
|
||||||
|
|
||||||
GlStateManager.color( 1, 1, 1, 1 );
|
GlStateManager.color( 1, 1, 1, 1 );
|
||||||
final int width = inv.getInventory().getSlots() * 18;
|
final int width = 9 * 18;
|
||||||
this.drawTexturedModalRect( offsetX + 20, offsetY + offset, 20, 173, width, 18 );
|
|
||||||
|
int extraLines = numUpgradesMap.get( lineObj );
|
||||||
|
|
||||||
|
for( int row = 0; row < 1 + extraLines && linesDraw < LINES_ON_PAGE; ++row )
|
||||||
|
{
|
||||||
|
this.drawTexturedModalRect( offsetX + 20, offsetY + offset , 20, 173, width, 18 );
|
||||||
|
offset += 18;
|
||||||
|
linesDraw++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
offset += 18;
|
||||||
|
linesDraw++;
|
||||||
}
|
}
|
||||||
offset += 18;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( this.searchFieldInputs != null )
|
if( this.searchFieldInputs != null )
|
||||||
@@ -337,6 +359,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
|||||||
final ClientDCInternalInv current = this.getById( id, invData.getLong( "sortBy" ), invData.getString( "un" ) );
|
final ClientDCInternalInv current = this.getById( id, invData.getLong( "sortBy" ), invData.getString( "un" ) );
|
||||||
blockPosHashMap.put( current, NBTUtil.getPosFromTag( invData.getCompoundTag( "pos" )) );
|
blockPosHashMap.put( current, NBTUtil.getPosFromTag( invData.getCompoundTag( "pos" )) );
|
||||||
dimHashMap.put( current, invData.getInteger( "dim" ));
|
dimHashMap.put( current, invData.getInteger( "dim" ));
|
||||||
|
numUpgradesMap.put( current, invData.getInteger("numUpgrades"));
|
||||||
|
|
||||||
for( int x = 0; x < current.getInventory().getSlots(); x++ )
|
for( int x = 0; x < current.getInventory().getSlots(); x++ )
|
||||||
{
|
{
|
||||||
@@ -458,7 +481,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
|||||||
this.lines.addAll( clientInventories );
|
this.lines.addAll( clientInventories );
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getScrollBar().setRange( 0, this.lines.size() - LINES_ON_PAGE, 2 );
|
this.getScrollBar().setRange( 0, this.lines.size() - 1, 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean itemStackMatchesSearchTerm( final ItemStack itemStack, final String searchTerm,int pass )
|
private boolean itemStackMatchesSearchTerm( final ItemStack itemStack, final String searchTerm,int pass )
|
||||||
@@ -548,7 +571,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
|||||||
|
|
||||||
if( o == null )
|
if( o == null )
|
||||||
{
|
{
|
||||||
this.byId.put( id, o = new ClientDCInternalInv( 9, id, sortBy, string ) );
|
this.byId.put( id, o = new ClientDCInternalInv( DualityInterface.NUMBER_OF_PATTERN_SLOTS, id, sortBy, string ) );
|
||||||
this.refreshList = true;
|
this.refreshList = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
package appeng.container.implementations;
|
package appeng.container.implementations;
|
||||||
|
|
||||||
|
|
||||||
|
import appeng.api.config.Upgrades;
|
||||||
|
import appeng.container.slot.*;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
|
||||||
import appeng.api.config.SecurityPermissions;
|
import appeng.api.config.SecurityPermissions;
|
||||||
@@ -26,14 +28,11 @@ import appeng.api.config.Settings;
|
|||||||
import appeng.api.config.YesNo;
|
import appeng.api.config.YesNo;
|
||||||
import appeng.api.util.IConfigManager;
|
import appeng.api.util.IConfigManager;
|
||||||
import appeng.container.guisync.GuiSync;
|
import appeng.container.guisync.GuiSync;
|
||||||
import appeng.container.slot.SlotFake;
|
|
||||||
import appeng.container.slot.SlotNormal;
|
|
||||||
import appeng.container.slot.SlotRestrictedInput;
|
|
||||||
import appeng.helpers.DualityInterface;
|
import appeng.helpers.DualityInterface;
|
||||||
import appeng.helpers.IInterfaceHost;
|
import appeng.helpers.IInterfaceHost;
|
||||||
|
|
||||||
|
|
||||||
public class ContainerInterface extends ContainerUpgradeable
|
public class ContainerInterface extends ContainerUpgradeable implements IOptionalSlotHost
|
||||||
{
|
{
|
||||||
|
|
||||||
private final DualityInterface myDuality;
|
private final DualityInterface myDuality;
|
||||||
@@ -50,10 +49,13 @@ public class ContainerInterface extends ContainerUpgradeable
|
|||||||
|
|
||||||
this.myDuality = te.getInterfaceDuality();
|
this.myDuality = te.getInterfaceDuality();
|
||||||
|
|
||||||
for( int x = 0; x < DualityInterface.NUMBER_OF_PATTERN_SLOTS; x++ )
|
for (int row = 0 ; row < 4 ; ++row)
|
||||||
{
|
{
|
||||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_PATTERN, this.myDuality
|
for( int x = 0; x < 9; x++ )
|
||||||
.getPatterns(), x, 8 + 18 * x, 90 + 7, this.getInventoryPlayer() ).setStackLimit( 1 ) );
|
{
|
||||||
|
this.addSlotToContainer( new OptionalSlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_PATTERN, this.myDuality
|
||||||
|
.getPatterns(), this, x + row * 9, 8 + 18 * x, 97 + ( 18 * row ), row, this.getInventoryPlayer() ).setStackLimit( 1 ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for( int x = 0; x < DualityInterface.NUMBER_OF_CONFIG_SLOTS; x++ )
|
for( int x = 0; x < DualityInterface.NUMBER_OF_CONFIG_SLOTS; x++ )
|
||||||
@@ -70,7 +72,7 @@ public class ContainerInterface extends ContainerUpgradeable
|
|||||||
@Override
|
@Override
|
||||||
protected int getHeight()
|
protected int getHeight()
|
||||||
{
|
{
|
||||||
return 211;
|
return 256;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -82,7 +84,19 @@ public class ContainerInterface extends ContainerUpgradeable
|
|||||||
@Override
|
@Override
|
||||||
public int availableUpgrades()
|
public int availableUpgrades()
|
||||||
{
|
{
|
||||||
return 1;
|
return 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isSlotEnabled( final int idx )
|
||||||
|
{
|
||||||
|
return myDuality.getInstalledUpgrades(Upgrades.PATTERN_EXPANSION) >= idx;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean supportCapacity()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -118,4 +132,9 @@ public class ContainerInterface extends ContainerUpgradeable
|
|||||||
{
|
{
|
||||||
this.iTermMode = iTermMode;
|
this.iTermMode = iTermMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getPatternUpgrades()
|
||||||
|
{
|
||||||
|
return this.myDuality.getInstalledUpgrades( Upgrades.PATTERN_EXPANSION );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
import appeng.api.config.Upgrades;
|
||||||
import net.minecraft.entity.player.EntityPlayerMP;
|
import net.minecraft.entity.player.EntityPlayerMP;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
@@ -405,6 +406,7 @@ public final class ContainerInterfaceTerminal extends AEBaseContainer
|
|||||||
tag.setString( "un", inv.unlocalizedName );
|
tag.setString( "un", inv.unlocalizedName );
|
||||||
tag.setTag( "pos", NBTUtil.createPosTag( inv.pos ) );
|
tag.setTag( "pos", NBTUtil.createPosTag( inv.pos ) );
|
||||||
tag.setInteger( "dim", inv.dim );
|
tag.setInteger( "dim", inv.dim );
|
||||||
|
tag.setInteger( "numUpgrades", inv.numUpgrades );
|
||||||
}
|
}
|
||||||
|
|
||||||
for( int x = 0; x < length; x++ )
|
for( int x = 0; x < length; x++ )
|
||||||
@@ -437,6 +439,7 @@ public final class ContainerInterfaceTerminal extends AEBaseContainer
|
|||||||
private final IItemHandler server;
|
private final IItemHandler server;
|
||||||
private final BlockPos pos;
|
private final BlockPos pos;
|
||||||
private final int dim;
|
private final int dim;
|
||||||
|
private final int numUpgrades;
|
||||||
|
|
||||||
public InvTracker( final DualityInterface dual, final IItemHandler patterns, final String unlocalizedName )
|
public InvTracker( final DualityInterface dual, final IItemHandler patterns, final String unlocalizedName )
|
||||||
{
|
{
|
||||||
@@ -446,6 +449,7 @@ public final class ContainerInterfaceTerminal extends AEBaseContainer
|
|||||||
this.sortBy = dual.getSortValue();
|
this.sortBy = dual.getSortValue();
|
||||||
this.pos = dual.getLocation().getPos();
|
this.pos = dual.getLocation().getPos();
|
||||||
this.dim = dual.getLocation().getWorld().provider.getDimension();
|
this.dim = dual.getLocation().getWorld().provider.getDimension();
|
||||||
|
this.numUpgrades = dual.getInstalledUpgrades( Upgrades.PATTERN_EXPANSION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -363,6 +363,8 @@ final class Registration
|
|||||||
// Interface
|
// Interface
|
||||||
Upgrades.CRAFTING.registerItem( parts.iface(), 1 );
|
Upgrades.CRAFTING.registerItem( parts.iface(), 1 );
|
||||||
Upgrades.CRAFTING.registerItem( blocks.iface(), 1 );
|
Upgrades.CRAFTING.registerItem( blocks.iface(), 1 );
|
||||||
|
Upgrades.PATTERN_EXPANSION.registerItem( parts.iface(), 3 );
|
||||||
|
Upgrades.PATTERN_EXPANSION.registerItem( blocks.iface(), 3 );
|
||||||
|
|
||||||
// IO Port!
|
// IO Port!
|
||||||
Upgrades.SPEED.registerItem( blocks.iOPort(), 3 );
|
Upgrades.SPEED.registerItem( blocks.iOPort(), 3 );
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ public final class ApiMaterials implements IMaterials
|
|||||||
private final IItemDefinition cardRedstone;
|
private final IItemDefinition cardRedstone;
|
||||||
private final IItemDefinition cardSpeed;
|
private final IItemDefinition cardSpeed;
|
||||||
private final IItemDefinition cardCapacity;
|
private final IItemDefinition cardCapacity;
|
||||||
|
private final IItemDefinition cardPatternExpansion;
|
||||||
private final IItemDefinition cardFuzzy;
|
private final IItemDefinition cardFuzzy;
|
||||||
private final IItemDefinition cardInverter;
|
private final IItemDefinition cardInverter;
|
||||||
private final IItemDefinition cardCrafting;
|
private final IItemDefinition cardCrafting;
|
||||||
@@ -204,6 +205,7 @@ public final class ApiMaterials implements IMaterials
|
|||||||
this.cardRedstone = new DamagedItemDefinition( "material.card.redstone", materials.createMaterial( MaterialType.CARD_REDSTONE ) );
|
this.cardRedstone = new DamagedItemDefinition( "material.card.redstone", materials.createMaterial( MaterialType.CARD_REDSTONE ) );
|
||||||
this.cardSpeed = new DamagedItemDefinition( "material.card.acceleration", materials.createMaterial( MaterialType.CARD_SPEED ) );
|
this.cardSpeed = new DamagedItemDefinition( "material.card.acceleration", materials.createMaterial( MaterialType.CARD_SPEED ) );
|
||||||
this.cardCapacity = new DamagedItemDefinition( "material.card.capacity", materials.createMaterial( MaterialType.CARD_CAPACITY ) );
|
this.cardCapacity = new DamagedItemDefinition( "material.card.capacity", materials.createMaterial( MaterialType.CARD_CAPACITY ) );
|
||||||
|
this.cardPatternExpansion = new DamagedItemDefinition( "material.card.pattern.expansion", materials.createMaterial(MaterialType.CARD_PATTERN_EXPANSION) );
|
||||||
this.cardFuzzy = new DamagedItemDefinition( "material.card.fuzzy", materials.createMaterial( MaterialType.CARD_FUZZY ) );
|
this.cardFuzzy = new DamagedItemDefinition( "material.card.fuzzy", materials.createMaterial( MaterialType.CARD_FUZZY ) );
|
||||||
this.cardInverter = new DamagedItemDefinition( "material.card.inverter", materials.createMaterial( MaterialType.CARD_INVERTER ) );
|
this.cardInverter = new DamagedItemDefinition( "material.card.inverter", materials.createMaterial( MaterialType.CARD_INVERTER ) );
|
||||||
this.cardCrafting = new DamagedItemDefinition( "material.card.crafting", materials.createMaterial( MaterialType.CARD_CRAFTING ) );
|
this.cardCrafting = new DamagedItemDefinition( "material.card.crafting", materials.createMaterial( MaterialType.CARD_CRAFTING ) );
|
||||||
@@ -424,6 +426,9 @@ public final class ApiMaterials implements IMaterials
|
|||||||
return this.cardCapacity;
|
return this.cardCapacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IItemDefinition cardPatternExpansion(){ return this.cardPatternExpansion;}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IItemDefinition cardFuzzy()
|
public IItemDefinition cardFuzzy()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ package appeng.helpers;
|
|||||||
|
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
@@ -33,8 +32,6 @@ import de.ellpeck.actuallyadditions.api.tile.IPhantomTile;
|
|||||||
import gregtech.api.block.machines.BlockMachine;
|
import gregtech.api.block.machines.BlockMachine;
|
||||||
import gregtech.api.metatileentity.MetaTileEntity;
|
import gregtech.api.metatileentity.MetaTileEntity;
|
||||||
import gregtech.api.metatileentity.MetaTileEntityHolder;
|
import gregtech.api.metatileentity.MetaTileEntityHolder;
|
||||||
import gregtech.api.metatileentity.TieredMetaTileEntity;
|
|
||||||
import gregtech.api.metatileentity.WorkableTieredMetaTileEntity;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
@@ -115,7 +112,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
|||||||
|
|
||||||
public static final int NUMBER_OF_STORAGE_SLOTS = 9;
|
public static final int NUMBER_OF_STORAGE_SLOTS = 9;
|
||||||
public static final int NUMBER_OF_CONFIG_SLOTS = 9;
|
public static final int NUMBER_OF_CONFIG_SLOTS = 9;
|
||||||
public static final int NUMBER_OF_PATTERN_SLOTS = 9;
|
public static final int NUMBER_OF_PATTERN_SLOTS = 36;
|
||||||
|
|
||||||
private static final Collection<Block> BAD_BLOCKS = new HashSet<>( 100 );
|
private static final Collection<Block> BAD_BLOCKS = new HashSet<>( 100 );
|
||||||
private final IAEItemStack[] requireWork = { null, null, null, null, null, null, null, null, null };
|
private final IAEItemStack[] requireWork = { null, null, null, null, null, null, null, null, null };
|
||||||
@@ -151,7 +148,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
|||||||
this.gridProxy = networkProxy;
|
this.gridProxy = networkProxy;
|
||||||
this.gridProxy.setFlags( GridFlags.REQUIRE_CHANNEL );
|
this.gridProxy.setFlags( GridFlags.REQUIRE_CHANNEL );
|
||||||
|
|
||||||
this.upgrades = new StackUpgradeInventory( this.gridProxy.getMachineRepresentation(), this, 1 );
|
this.upgrades = new StackUpgradeInventory( this.gridProxy.getMachineRepresentation(), this, 4);
|
||||||
this.cm.registerSetting( Settings.BLOCK, YesNo.NO );
|
this.cm.registerSetting( Settings.BLOCK, YesNo.NO );
|
||||||
this.cm.registerSetting( Settings.INTERFACE_TERMINAL, YesNo.YES );
|
this.cm.registerSetting( Settings.INTERFACE_TERMINAL, YesNo.YES );
|
||||||
|
|
||||||
@@ -279,10 +276,11 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.waitingToSendFacing = null;
|
this.waitingToSendFacing = null;
|
||||||
final NBTTagCompound waitingListSided = data.getCompoundTag("sidedWaitList");
|
final NBTTagCompound waitingListSided = data.getCompoundTag( "sidedWaitList" );
|
||||||
|
|
||||||
for (EnumFacing s : EnumFacing.values())
|
for( EnumFacing s : EnumFacing.values() )
|
||||||
if (waitingListSided.hasKey( s.name() )) {
|
if( waitingListSided.hasKey( s.name() ) )
|
||||||
|
{
|
||||||
NBTTagList w = waitingListSided.getTagList( s.name(), 10 );
|
NBTTagList w = waitingListSided.getTagList( s.name(), 10 );
|
||||||
for( int x = 0; x < w.tagCount(); x++ )
|
for( int x = 0; x < w.tagCount(); x++ )
|
||||||
{
|
{
|
||||||
@@ -290,12 +288,21 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
|||||||
if( c != null )
|
if( c != null )
|
||||||
{
|
{
|
||||||
final ItemStack is = new ItemStack( c );
|
final ItemStack is = new ItemStack( c );
|
||||||
this.addToSendListFacing( is , EnumFacing.getFront( s.getIndex() ) );
|
this.addToSendListFacing( is, EnumFacing.getFront( s.getIndex() ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.craftingTracker.readFromNBT( data );
|
this.craftingTracker.readFromNBT( data );
|
||||||
|
|
||||||
|
// fix upgrade slot size mismatch
|
||||||
|
NBTTagCompound up = data.getCompoundTag( "upgrades" );
|
||||||
|
if( up.hasKey( "Size" ) && up.getInteger( "Size" ) != this.upgrades.getSlots() )
|
||||||
|
{
|
||||||
|
up.setInteger( "Size", this.upgrades.getSlots() );
|
||||||
|
this.upgrades.writeToNBT( up, "upgrades" );
|
||||||
|
}
|
||||||
|
|
||||||
this.upgrades.readFromNBT( data, "upgrades" );
|
this.upgrades.readFromNBT( data, "upgrades" );
|
||||||
this.config.readFromNBT( data, "config" );
|
this.config.readFromNBT( data, "config" );
|
||||||
this.patterns.readFromNBT( data, "patterns" );
|
this.patterns.readFromNBT( data, "patterns" );
|
||||||
@@ -400,9 +407,8 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
|||||||
|
|
||||||
private void updateCraftingList()
|
private void updateCraftingList()
|
||||||
{
|
{
|
||||||
final Boolean[] accountedFor = { false, false, false, false, false, false, false, false, false }; // 9...
|
final Boolean[] accountedFor = new Boolean[this.patterns.getSlots()];
|
||||||
|
Arrays.fill( accountedFor, false );
|
||||||
assert ( accountedFor.length == this.patterns.getSlots() );
|
|
||||||
|
|
||||||
if( !this.gridProxy.isReady() )
|
if( !this.gridProxy.isReady() )
|
||||||
{
|
{
|
||||||
@@ -417,7 +423,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
|||||||
final ICraftingPatternDetails details = i.next();
|
final ICraftingPatternDetails details = i.next();
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
|
|
||||||
for( int x = 0; x < accountedFor.length; x++ )
|
for( int x = 0; x < accountedFor.length ; x++ )
|
||||||
{
|
{
|
||||||
final ItemStack is = this.patterns.getStackInSlot( x );
|
final ItemStack is = this.patterns.getStackInSlot( x );
|
||||||
if( details.getPattern() == is )
|
if( details.getPattern() == is )
|
||||||
@@ -433,7 +439,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for( int x = 0; x < accountedFor.length; x++ )
|
for( int x = 0; x < accountedFor.length ; x++ )
|
||||||
{
|
{
|
||||||
if( !accountedFor[x] )
|
if( !accountedFor[x] )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -164,6 +164,8 @@ public final class ItemMaterial extends AEBaseItem implements IStorageComponent,
|
|||||||
return Upgrades.INVERTER;
|
return Upgrades.INVERTER;
|
||||||
case CARD_CRAFTING:
|
case CARD_CRAFTING:
|
||||||
return Upgrades.CRAFTING;
|
return Upgrades.CRAFTING;
|
||||||
|
case CARD_PATTERN_EXPANSION:
|
||||||
|
return Upgrades.PATTERN_EXPANSION;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,7 +118,10 @@ public enum MaterialType
|
|||||||
FLUID_CELL1K_PART( 54, "material_fluid_cell1k_part", EnumSet.of( AEFeature.STORAGE_CELLS ) ),
|
FLUID_CELL1K_PART( 54, "material_fluid_cell1k_part", EnumSet.of( AEFeature.STORAGE_CELLS ) ),
|
||||||
FLUID_CELL4K_PART( 55, "material_fluid_cell4k_part", EnumSet.of( AEFeature.STORAGE_CELLS ) ),
|
FLUID_CELL4K_PART( 55, "material_fluid_cell4k_part", EnumSet.of( AEFeature.STORAGE_CELLS ) ),
|
||||||
FLUID_CELL16K_PART( 56, "material_fluid_cell16k_part", EnumSet.of( AEFeature.STORAGE_CELLS ) ),
|
FLUID_CELL16K_PART( 56, "material_fluid_cell16k_part", EnumSet.of( AEFeature.STORAGE_CELLS ) ),
|
||||||
FLUID_CELL64K_PART( 57, "material_fluid_cell64k_part", EnumSet.of( AEFeature.STORAGE_CELLS ) );
|
FLUID_CELL64K_PART( 57, "material_fluid_cell64k_part", EnumSet.of( AEFeature.STORAGE_CELLS ) ),
|
||||||
|
|
||||||
|
CARD_PATTERN_EXPANSION( 58, "material_card_pattern_expansion", EnumSet.of( AEFeature.ADVANCED_CARDS ) );
|
||||||
|
|
||||||
|
|
||||||
private final Set<AEFeature> features;
|
private final Set<AEFeature> features;
|
||||||
private final ModelResourceLocation model;
|
private final ModelResourceLocation model;
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ import java.util.*;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import appeng.api.config.Upgrades;
|
||||||
|
import appeng.helpers.DualityInterface;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
import net.minecraft.inventory.InventoryCrafting;
|
import net.minecraft.inventory.InventoryCrafting;
|
||||||
@@ -671,6 +673,11 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m instanceof DualityInterface )
|
||||||
|
{
|
||||||
|
sum *= ( Math.pow( 4, ( (DualityInterface) m ).getInstalledUpgrades( Upgrades.PATTERN_EXPANSION ) ) );
|
||||||
|
}
|
||||||
|
|
||||||
// power...
|
// power...
|
||||||
if( eg.extractAEPower( sum, Actionable.MODULATE, PowerMultiplier.CONFIG ) < sum - 0.01 )
|
if( eg.extractAEPower( sum, Actionable.MODULATE, PowerMultiplier.CONFIG ) < sum - 0.01 )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,7 +19,13 @@
|
|||||||
package appeng.parts.automation;
|
package appeng.parts.automation;
|
||||||
|
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
import appeng.container.slot.SlotRestrictedInput;
|
||||||
|
import appeng.core.Api;
|
||||||
|
import appeng.helpers.DualityInterface;
|
||||||
|
import appeng.util.inv.ItemHandlerIterator;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
|
import net.minecraft.inventory.Slot;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
@@ -45,6 +51,7 @@ public abstract class UpgradeInventory extends AppEngInternalInventory implement
|
|||||||
private int capacityUpgrades = 0;
|
private int capacityUpgrades = 0;
|
||||||
private int inverterUpgrades = 0;
|
private int inverterUpgrades = 0;
|
||||||
private int craftingUpgrades = 0;
|
private int craftingUpgrades = 0;
|
||||||
|
private int patternExpansionUpgrades = 0;
|
||||||
|
|
||||||
public UpgradeInventory( final IAEAppEngInventory parent, final int s )
|
public UpgradeInventory( final IAEAppEngInventory parent, final int s )
|
||||||
{
|
{
|
||||||
@@ -81,6 +88,8 @@ public abstract class UpgradeInventory extends AppEngInternalInventory implement
|
|||||||
return this.inverterUpgrades;
|
return this.inverterUpgrades;
|
||||||
case CRAFTING:
|
case CRAFTING:
|
||||||
return this.craftingUpgrades;
|
return this.craftingUpgrades;
|
||||||
|
case PATTERN_EXPANSION:
|
||||||
|
return this.patternExpansionUpgrades;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -91,7 +100,7 @@ public abstract class UpgradeInventory extends AppEngInternalInventory implement
|
|||||||
private void updateUpgradeInfo()
|
private void updateUpgradeInfo()
|
||||||
{
|
{
|
||||||
this.cached = true;
|
this.cached = true;
|
||||||
this.inverterUpgrades = this.capacityUpgrades = this.redstoneUpgrades = this.speedUpgrades = this.fuzzyUpgrades = this.craftingUpgrades = 0;
|
this.patternExpansionUpgrades = this.inverterUpgrades = this.capacityUpgrades = this.redstoneUpgrades = this.speedUpgrades = this.fuzzyUpgrades = this.craftingUpgrades = 0;
|
||||||
|
|
||||||
for( final ItemStack is : this )
|
for( final ItemStack is : this )
|
||||||
{
|
{
|
||||||
@@ -121,6 +130,9 @@ public abstract class UpgradeInventory extends AppEngInternalInventory implement
|
|||||||
case CRAFTING:
|
case CRAFTING:
|
||||||
this.craftingUpgrades++;
|
this.craftingUpgrades++;
|
||||||
break;
|
break;
|
||||||
|
case PATTERN_EXPANSION:
|
||||||
|
this.patternExpansionUpgrades++;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -132,6 +144,7 @@ public abstract class UpgradeInventory extends AppEngInternalInventory implement
|
|||||||
this.speedUpgrades = Math.min( this.speedUpgrades, this.getMaxInstalled( Upgrades.SPEED ) );
|
this.speedUpgrades = Math.min( this.speedUpgrades, this.getMaxInstalled( Upgrades.SPEED ) );
|
||||||
this.inverterUpgrades = Math.min( this.inverterUpgrades, this.getMaxInstalled( Upgrades.INVERTER ) );
|
this.inverterUpgrades = Math.min( this.inverterUpgrades, this.getMaxInstalled( Upgrades.INVERTER ) );
|
||||||
this.craftingUpgrades = Math.min( this.craftingUpgrades, this.getMaxInstalled( Upgrades.CRAFTING ) );
|
this.craftingUpgrades = Math.min( this.craftingUpgrades, this.getMaxInstalled( Upgrades.CRAFTING ) );
|
||||||
|
this.patternExpansionUpgrades = Math.min( this.patternExpansionUpgrades, this.getMaxInstalled( Upgrades.PATTERN_EXPANSION ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -160,6 +173,28 @@ public abstract class UpgradeInventory extends AppEngInternalInventory implement
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nonnull
|
||||||
|
@Override
|
||||||
|
public ItemStack extractItem( int slot, int amount, boolean simulate )
|
||||||
|
{
|
||||||
|
if( patternExpansionUpgrades > 0 )
|
||||||
|
{
|
||||||
|
if( parent instanceof DualityInterface )
|
||||||
|
{
|
||||||
|
IItemHandler patternInv = ( (DualityInterface) parent ).getPatterns();
|
||||||
|
for( int invSlot = 0; invSlot < patternInv.getSlots(); invSlot++ )
|
||||||
|
{
|
||||||
|
ItemStack is = patternInv.getStackInSlot( invSlot );
|
||||||
|
if( invSlot > patternExpansionUpgrades * 9 && !is.isEmpty() )
|
||||||
|
{
|
||||||
|
return ItemStack.EMPTY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return super.extractItem( slot, amount, simulate );
|
||||||
|
}
|
||||||
|
|
||||||
private class UpgradeInvFilter implements IAEItemFilter
|
private class UpgradeInvFilter implements IAEItemFilter
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ public class AppEngInternalInventory extends ItemStackHandler implements Iterabl
|
|||||||
this.enableClientEvents = enableClientEvents;
|
this.enableClientEvents = enableClientEvents;
|
||||||
}
|
}
|
||||||
|
|
||||||
private IAEAppEngInventory getTileEntity()
|
public IAEAppEngInventory getTileEntity()
|
||||||
{
|
{
|
||||||
return this.te;
|
return this.te;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -450,6 +450,7 @@ item.appliedenergistics2.material.basic_card.name=Basic Card
|
|||||||
item.appliedenergistics2.material.blank_pattern.name=Blank Pattern
|
item.appliedenergistics2.material.blank_pattern.name=Blank Pattern
|
||||||
item.appliedenergistics2.material.calculation_processor.name=Calculation Processor
|
item.appliedenergistics2.material.calculation_processor.name=Calculation Processor
|
||||||
item.appliedenergistics2.material.card_capacity.name=Capacity Card
|
item.appliedenergistics2.material.card_capacity.name=Capacity Card
|
||||||
|
item.appliedenergistics2.material.card_pattern_expansion.name=Pattern Expansion Card
|
||||||
item.appliedenergistics2.material.card_fuzzy.name=Fuzzy Card
|
item.appliedenergistics2.material.card_fuzzy.name=Fuzzy Card
|
||||||
item.appliedenergistics2.material.card_inverter.name=Inverter Card
|
item.appliedenergistics2.material.card_inverter.name=Inverter Card
|
||||||
item.appliedenergistics2.material.card_redstone.name=Redstone Card
|
item.appliedenergistics2.material.card_redstone.name=Redstone Card
|
||||||
|
|||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "appliedenergistics2:items/material_card_pattern_expansion"
|
||||||
|
}
|
||||||
|
}
|
||||||
+49
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"type": "forge:and",
|
||||||
|
"values": [
|
||||||
|
{
|
||||||
|
"type": "appliedenergistics2:material_exists",
|
||||||
|
"material": "material.card_capacity"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "appliedenergistics2:material_exists",
|
||||||
|
"material": "material.basic_card"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"result": {
|
||||||
|
"type": "appliedenergistics2:part",
|
||||||
|
"part": "material.card_pattern_expansion"
|
||||||
|
},
|
||||||
|
"type": "appliedenergistics2:part_shaped",
|
||||||
|
"pattern": [
|
||||||
|
"ci"
|
||||||
|
],
|
||||||
|
"ingredients": [
|
||||||
|
{
|
||||||
|
"type": "appliedenergistics2:part",
|
||||||
|
"part": "material.advanced_card"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "#"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"i": [
|
||||||
|
{
|
||||||
|
"item": "appliedenergistics2:interface"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "appliedenergistics2:part",
|
||||||
|
"part": "part.interface"
|
||||||
|
}],
|
||||||
|
"c": {
|
||||||
|
"type": "appliedenergistics2:part",
|
||||||
|
"part": "material.advanced_card"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 6.0 KiB |
Reference in New Issue
Block a user