Fix issues with the expanded pattern terminal and its patterns crafting
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ aebuild=7
|
|||||||
aegroup=appeng
|
aegroup=appeng
|
||||||
aebasename=appliedenergistics2
|
aebasename=appliedenergistics2
|
||||||
trousers=trousers_edition
|
trousers=trousers_edition
|
||||||
trousersversion=v49q
|
trousersversion=v49r
|
||||||
#########################################################
|
#########################################################
|
||||||
# Versions #
|
# Versions #
|
||||||
#########################################################
|
#########################################################
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import java.util.concurrent.Future;
|
|||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
|
import appeng.parts.reporting.PartExpandedProcessingPatternTerminal;
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
@@ -345,11 +346,15 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
|||||||
originalGui = GuiBridge.GUI_PATTERN_TERMINAL;
|
originalGui = GuiBridge.GUI_PATTERN_TERMINAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( ah instanceof PartExpandedProcessingPatternTerminal )
|
||||||
|
{
|
||||||
|
originalGui = GuiBridge.GUI_EXPANDED_PROCESSING_PATTERN_TERMINAL;
|
||||||
|
}
|
||||||
|
|
||||||
if( this.result != null && !this.isSimulation() )
|
if( this.result != null && !this.isSimulation() )
|
||||||
{
|
{
|
||||||
final ICraftingGrid cc = this.getGrid().getCache( ICraftingGrid.class );
|
final ICraftingGrid cc = this.getGrid().getCache( ICraftingGrid.class );
|
||||||
final ICraftingLink g = cc.submitJob( this.result, null, this.getSelectedCpu() == -1 ? null : this.cpus.get( this.getSelectedCpu() ).getCpu(), true,
|
final ICraftingLink g = cc.submitJob( this.result, null, this.getSelectedCpu() == -1 ? null : this.cpus.get( this.getSelectedCpu() ).getCpu(), true, this.getActionSrc() );
|
||||||
this.getActionSrc() );
|
|
||||||
this.setAutoStart( false );
|
this.setAutoStart( false );
|
||||||
if( g != null && originalGui != null && this.getOpenContext() != null )
|
if( g != null && originalGui != null && this.getOpenContext() != null )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -47,7 +47,9 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable<Patter
|
|||||||
|
|
||||||
private static final int CRAFTING_GRID_DIMENSION = 3;
|
private static final int CRAFTING_GRID_DIMENSION = 3;
|
||||||
private static final int CRAFTING_INPUT_LIMIT = CRAFTING_GRID_DIMENSION * CRAFTING_GRID_DIMENSION;
|
private static final int CRAFTING_INPUT_LIMIT = CRAFTING_GRID_DIMENSION * CRAFTING_GRID_DIMENSION;
|
||||||
public static final int PROCESSING_INPUT_LIMIT = 16;
|
public static final int PROCESSING_INPUT_HEIGHT = 4;
|
||||||
|
public static final int PROCESSING_INPUT_WIDTH = 4;
|
||||||
|
public static final int PROCESSING_INPUT_LIMIT = PROCESSING_INPUT_HEIGHT * PROCESSING_INPUT_WIDTH;
|
||||||
private static final int CRAFTING_OUTPUT_LIMIT = 1;
|
private static final int CRAFTING_OUTPUT_LIMIT = 1;
|
||||||
public static final int PROCESSING_OUTPUT_LIMIT = 6;
|
public static final int PROCESSING_OUTPUT_LIMIT = 6;
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
import appeng.api.config.Upgrades;
|
import appeng.api.config.Upgrades;
|
||||||
import appeng.helpers.DualityInterface;
|
import appeng.helpers.DualityInterface;
|
||||||
|
import appeng.helpers.PatternHelper;
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
@@ -742,24 +743,35 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU
|
|||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if( details.isCraftable() )
|
||||||
|
{
|
||||||
|
ic = new InventoryCrafting( new ContainerNull(), 3, 3 );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ic = new InventoryCrafting( new ContainerNull(), PatternHelper.PROCESSING_INPUT_WIDTH, PatternHelper.PROCESSING_INPUT_HEIGHT );
|
||||||
|
}
|
||||||
|
|
||||||
ic = new InventoryCrafting( new ContainerNull(), 3, 3 );
|
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
|
|
||||||
for (int x = 0; x < input.length; x++) {
|
for( int x = 0; x < input.length; x++ )
|
||||||
if (input[x] != null) {
|
{
|
||||||
|
if( input[x] != null )
|
||||||
|
{
|
||||||
found = false;
|
found = false;
|
||||||
|
|
||||||
if (details.isCraftable()) {
|
if( details.isCraftable() )
|
||||||
|
{
|
||||||
final Collection<IAEItemStack> itemList;
|
final Collection<IAEItemStack> itemList;
|
||||||
|
|
||||||
if (details.canSubstitute()) {
|
if( details.canSubstitute() )
|
||||||
final List<IAEItemStack> substitutes = details.getSubstituteInputs(x);
|
{
|
||||||
itemList = new ArrayList<>(substitutes.size());
|
final List<IAEItemStack> substitutes = details.getSubstituteInputs( x );
|
||||||
|
itemList = new ArrayList<>( substitutes.size() );
|
||||||
|
|
||||||
for (IAEItemStack stack : substitutes) {
|
for( IAEItemStack stack : substitutes )
|
||||||
itemList.addAll(this.inventory.getItemList().findFuzzy(stack,
|
{
|
||||||
FuzzyMode.IGNORE_ALL));
|
itemList.addAll( this.inventory.getItemList().findFuzzy( stack, FuzzyMode.IGNORE_ALL ) );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
itemList = new ArrayList<>(1);
|
itemList = new ArrayList<>(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user