attempt at fixing the item stack size issue
This commit is contained in:
parent
92af5a1537
commit
94803e88f3
23 changed files with 90 additions and 74 deletions
|
@ -9,8 +9,8 @@ public class EmcValues {
|
|||
public static void init()
|
||||
{
|
||||
for(IBaseRecipeType recipeType : RecipeHanderer.recipeList){
|
||||
if(recipeType.getOutputs().size() == 1){
|
||||
RecipeRegistryProxy.addRecipe(recipeType.getOutputs().get(0), recipeType.getInputs());
|
||||
if(recipeType.getOutputsSize() == 1){
|
||||
RecipeRegistryProxy.addRecipe(recipeType.getOutput(0), recipeType.getInputs());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ public class AlloySmelterRecipeHandler extends GenericRecipeHander implements IN
|
|||
PositionedStack pStack2 = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(1)), 65 - offset, 17 - offset);
|
||||
input.add(pStack2);
|
||||
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutputs().get(0), 116 - offset, 35 - offset);
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 116 - offset, 35 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@ public class AssemblingMachineRecipeHandler extends GenericRecipeHander implemen
|
|||
input.add(pStack2);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputs().size() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutputs().get(0), 116 - offset, 35 - offset);
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 116 - offset, 35 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
|
||||
|
|
|
@ -21,23 +21,23 @@ public class CentrifugeRecipeHandler extends GenericRecipeHander implements INei
|
|||
input.add(pStack2);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputs().size() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutputs().get(0), 80 - offset, 5 - offset);
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 80 - offset, 5 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputs().size() > 1) {
|
||||
PositionedStack pStack4 = new PositionedStack(recipeType.getOutputs().get(1), 110 - offset, 35 - offset);
|
||||
if (recipeType.getOutputsSize() > 1) {
|
||||
PositionedStack pStack4 = new PositionedStack(recipeType.getOutput(1), 110 - offset, 35 - offset);
|
||||
outputs.add(pStack4);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputs().size() > 2) {
|
||||
PositionedStack pStack5 = new PositionedStack(recipeType.getOutputs().get(2), 80 - offset, 65 - offset);
|
||||
if (recipeType.getOutputsSize() > 2) {
|
||||
PositionedStack pStack5 = new PositionedStack(recipeType.getOutput(2), 80 - offset, 65 - offset);
|
||||
outputs.add(pStack5);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputs().size() > 3) {
|
||||
PositionedStack pStack6 = new PositionedStack(recipeType.getOutputs().get(3), 50 - offset, 35 - offset);
|
||||
if (recipeType.getOutputsSize() > 3) {
|
||||
PositionedStack pStack6 = new PositionedStack(recipeType.getOutput(3), 50 - offset, 35 - offset);
|
||||
outputs.add(pStack6);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@ public class ChemicalReactorRecipeHandler extends GenericRecipeHander implements
|
|||
input.add(pStack2);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputs().size() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutputs().get(0), 80 - offset, 51 - offset);
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 80 - offset, 51 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,11 +113,11 @@ public abstract class GenericRecipeHander extends TemplateRecipeHandler {
|
|||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result) {
|
||||
for (IBaseRecipeType recipeType : RecipeHanderer.getRecipeClassFromName(getNeiBaseRecipe().getRecipeName())) {
|
||||
for (ItemStack output : recipeType.getOutputs()) {
|
||||
if (ItemUtils.isItemEqual(output, result, true, false, true)) {
|
||||
addCached(recipeType);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < recipeType.getOutputsSize(); i++) {
|
||||
if (ItemUtils.isItemEqual(recipeType.getOutput(i), result, true, false, true)) {
|
||||
addCached(recipeType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,23 +28,23 @@ public class GrinderRecipeHandler extends GenericRecipeHander implements INeiBas
|
|||
input.add(pStack2);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputs().size() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutputs().get(0), 2 - offset, 77 - offset);
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 2 - offset, 77 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
|
||||
if (recipeType.getInputs().size() > 1) {
|
||||
PositionedStack pStack4 = new PositionedStack(recipeType.getOutputs().get(1), 2 - offset, 95 - offset);
|
||||
if (recipeType.getOutputsSize() > 1) {
|
||||
PositionedStack pStack4 = new PositionedStack(recipeType.getOutput(1), 2 - offset, 95 - offset);
|
||||
outputs.add(pStack4);
|
||||
}
|
||||
|
||||
if (recipeType.getInputs().size() > 2) {
|
||||
PositionedStack pStack5 = new PositionedStack(recipeType.getOutputs().get(2), 4 - offset, 113 - offset);
|
||||
if (recipeType.getOutputsSize() > 2) {
|
||||
PositionedStack pStack5 = new PositionedStack(recipeType.getOutput(2), 4 - offset, 113 - offset);
|
||||
outputs.add(pStack5);
|
||||
}
|
||||
|
||||
if (recipeType.getInputs().size() > 3) {
|
||||
PositionedStack pStack6 = new PositionedStack(recipeType.getOutputs().get(3), 5 - offset, 131 - offset);
|
||||
if (recipeType.getOutputsSize() > 3) {
|
||||
PositionedStack pStack6 = new PositionedStack(recipeType.getOutput(3), 5 - offset, 131 - offset);
|
||||
outputs.add(pStack6);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,13 +22,13 @@ public class ImplosionCompressorRecipeHandler extends GenericRecipeHander implem
|
|||
input.add(pStack2);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputs().size() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutputs().get(0), 93 - offset, 35 - offset);
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 93 - offset, 35 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputs().size() > 1) {
|
||||
PositionedStack pStack4 = new PositionedStack(recipeType.getOutputs().get(1), 111 - offset, 35 - offset);
|
||||
if (recipeType.getOutputsSize() > 1) {
|
||||
PositionedStack pStack4 = new PositionedStack(recipeType.getOutput(1), 111 - offset, 35 - offset);
|
||||
outputs.add(pStack4);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,18 +22,18 @@ public class IndustrialSawmillRecipeHandler extends GenericRecipeHander implemen
|
|||
input.add(pStack2);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputs().size() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutputs().get(0), 84 - offset, 35 - offset);
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 84 - offset, 35 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputs().size() > 1) {
|
||||
PositionedStack pStack4 = new PositionedStack(recipeType.getOutputs().get(1), 102 - offset, 35 - offset);
|
||||
if (recipeType.getOutputsSize() > 1) {
|
||||
PositionedStack pStack4 = new PositionedStack(recipeType.getOutput(1), 102 - offset, 35 - offset);
|
||||
outputs.add(pStack4);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputs().size() > 2) {
|
||||
PositionedStack pStack5 = new PositionedStack(recipeType.getOutputs().get(2), 120 - offset, 35 - offset);
|
||||
if (recipeType.getOutputsSize() > 2) {
|
||||
PositionedStack pStack5 = new PositionedStack(recipeType.getOutput(2), 120 - offset, 35 - offset);
|
||||
outputs.add(pStack5);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,8 +17,8 @@ public class LatheRecipeHandler extends GenericRecipeHander implements INeiBaseR
|
|||
input.add(pStack);
|
||||
}
|
||||
|
||||
if (recipeType.getOutputs().size() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutputs().get(0), 116 - offset, 35 - offset);
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 116 - offset, 35 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,8 +16,8 @@ public class PlateCuttingMachineRecipeHandler extends GenericRecipeHander implem
|
|||
PositionedStack pStack = new PositionedStack(ItemUtils.getStackWithAllOre(recipeType.getInputs().get(0)), 56 - offset, 17 - offset);
|
||||
input.add(pStack);
|
||||
}
|
||||
if (recipeType.getOutputs().size() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutputs().get(0), 116 - offset, 35 - offset);
|
||||
if (recipeType.getOutputsSize() > 0) {
|
||||
PositionedStack pStack3 = new PositionedStack(recipeType.getOutput(0), 116 - offset, 35 - offset);
|
||||
outputs.add(pStack3);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue