From a8ecbb08f1397d822729c8b6b62301dc405e3c25 Mon Sep 17 00:00:00 2001 From: MadMan310 <66886359+MadMan310@users.noreply.github.com> Date: Sun, 26 Feb 2023 03:21:50 -0800 Subject: More CoAL improvements (#136) * Update TecTech Dependency * Add more item and fluid slots to the CoAL map * More Input Bus candidates * Add separate input bus capability * Spotless * NEI fix * tooltip fix * merge master (#139) * Update buildscript, fix missing windows gradle wrapper * Add alternative recipe to circuits (#137) * Make PrAss Accept EV+ glass (#138) * Add alternative recipe to circuits * Add glass Variants to PrAss --------- Co-authored-by: Raven Szewczyk Co-authored-by: LewisSaber <39595617+LewisSaber@users.noreply.github.com> * Recipe duration and power is 64x +cleanup * power+time req is 64x for LV-IV components * added support for new GUI buttons --------- Co-authored-by: Martin Robertz Co-authored-by: Raven Szewczyk Co-authored-by: LewisSaber <39595617+LewisSaber@users.noreply.github.com> --- src/main/java/goodgenerator/util/MyRecipeAdder.java | 13 +++++++------ src/main/java/goodgenerator/util/StackUtils.java | 10 +++++++++- 2 files changed, 16 insertions(+), 7 deletions(-) (limited to 'src/main/java/goodgenerator/util') diff --git a/src/main/java/goodgenerator/util/MyRecipeAdder.java b/src/main/java/goodgenerator/util/MyRecipeAdder.java index ce63af69ae..f5aad4cb00 100644 --- a/src/main/java/goodgenerator/util/MyRecipeAdder.java +++ b/src/main/java/goodgenerator/util/MyRecipeAdder.java @@ -515,7 +515,7 @@ public class MyRecipeAdder { aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); - setUsualFluidInputCount(8); + setUsualFluidInputCount(12); setNEITransferRect(new Rectangle(70, 15, 18, 54)); setNEISpecialInfoFormatter( (recipeInfo, applyPrefixAndSuffix) -> Collections.singletonList( @@ -524,17 +524,18 @@ public class MyRecipeAdder { @Override public List getItemInputPositions(int itemInputCount) { - return UIHelper.getGridPositions(itemInputCount, 16, 15, 3); + return UIHelper.getGridPositions(itemInputCount, 16, 8, 3); } @Override public List getItemOutputPositions(int itemOutputCount) { - return Collections.singletonList(new Pos2d(142, 15)); + return Collections.singletonList(new Pos2d(142, 8)); } @Override public List getFluidInputPositions(int fluidInputCount) { - return UIHelper.getGridPositions(fluidInputCount, 88, 37, 4); + + return UIHelper.getGridPositions(fluidInputCount, 88, 26, 4); } @Override @@ -545,7 +546,7 @@ public class MyRecipeAdder { Pos2d windowOffset) { builder.widget( new DrawableWidget().setDrawable(GG_UITextures.PICTURE_COMPONENT_ASSLINE) - .setPos(new Pos2d(70, 22).add(windowOffset)).setSize(72, 40)); + .setPos(new Pos2d(70, 11).add(windowOffset)).setSize(72, 40)); } } @@ -555,7 +556,7 @@ public class MyRecipeAdder { "Component Assembly Line", null, "goodgenerator:textures/gui/ComponentAssline", - 9, + 12, 1, 0, 0, diff --git a/src/main/java/goodgenerator/util/StackUtils.java b/src/main/java/goodgenerator/util/StackUtils.java index c4d8c4f9a1..3de85910cb 100644 --- a/src/main/java/goodgenerator/util/StackUtils.java +++ b/src/main/java/goodgenerator/util/StackUtils.java @@ -16,7 +16,7 @@ public class StackUtils { /** * Multiplies one ItemStack by a multiplier, and splits it into as many full stacks as it needs to. - * + * * @param stack The ItemStack you want to multiply * @param multiplier The number the stack is multiplied by * @return A List of stacks that, in total, are the same as the input ItemStack after it has been multiplied. @@ -67,6 +67,10 @@ public class StackUtils { return output; } + /** + * Turns the {@code items} List into a {@code HashMap} containing each unique {@code ItemStack} as the key, and a + * value representing the total amount of the respective {@code ItemStack} in the List. + */ public static HashMap getTotalItems(List items) { HashMap totals = new HashMap<>(); itemLoop: for (ItemStack item : items) { @@ -77,6 +81,10 @@ public class StackUtils { return totals; } + /** + * Turns the {@code items} Array into a {@code HashMap} containing each unique {@code ItemStack} as the key, and a + * value representing the total amount of the respective {@code ItemStack} in the Array. + */ public static HashMap getTotalItems(ItemStack[] items) { return getTotalItems(Arrays.asList(items)); } -- cgit