mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-19 20:00:00 +00:00
[ci skip] spotlessApply with the new settings
This commit is contained in:
1 parent
f1dea5460a
commit
f106b5e766
172 files changed
+2552
-2088
No files matched your search
@@ -1,32 +1,27 @@
|
||||
package codechicken.nei.recipe;
|
||||
|
||||
import codechicken.nei.NEIClientConfig;
|
||||
import codechicken.nei.NEIClientUtils;
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.item.crafting.ShapelessRecipes;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
import codechicken.nei.NEIClientConfig;
|
||||
import codechicken.nei.NEIClientUtils;
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
import codechicken.nei.PositionedStack;
|
||||
|
||||
public class ShapelessRecipeHandler extends ShapedRecipeHandler {
|
||||
public int[][] stackorder = new int[][] {
|
||||
{0, 0},
|
||||
{1, 0},
|
||||
{0, 1},
|
||||
{1, 1},
|
||||
{0, 2},
|
||||
{1, 2},
|
||||
{2, 0},
|
||||
{2, 1},
|
||||
{2, 2}
|
||||
};
|
||||
|
||||
public int[][] stackorder = new int[][] { { 0, 0 }, { 1, 0 }, { 0, 1 }, { 1, 1 }, { 0, 2 }, { 1, 2 }, { 2, 0 },
|
||||
{ 2, 1 }, { 2, 2 } };
|
||||
|
||||
public class CachedShapelessRecipe extends CachedRecipe {
|
||||
|
||||
public CachedShapelessRecipe() {
|
||||
ingredients = new ArrayList<>();
|
||||
}
|
||||
@@ -49,13 +44,15 @@ public class ShapelessRecipeHandler extends ShapedRecipeHandler {
|
||||
ingredients.clear();
|
||||
int itemsSize = items.size();
|
||||
if (itemsSize > stackorder.length) {
|
||||
NEIClientConfig.logger.error(
|
||||
"RECIPE BUG: Too many items (" + itemsSize + ") for " + this.result.toString());
|
||||
NEIClientConfig.logger
|
||||
.error("RECIPE BUG: Too many items (" + itemsSize + ") for " + this.result.toString());
|
||||
itemsSize = stackorder.length;
|
||||
}
|
||||
for (int ingred = 0; ingred < itemsSize; ingred++) {
|
||||
PositionedStack stack = new PositionedStack(
|
||||
items.get(ingred), 25 + stackorder[ingred][0] * 18, 6 + stackorder[ingred][1] * 18);
|
||||
items.get(ingred),
|
||||
25 + stackorder[ingred][0] * 18,
|
||||
6 + stackorder[ingred][1] * 18);
|
||||
stack.setMaxSize(1);
|
||||
ingredients.add(stack);
|
||||
}
|
||||
@@ -138,7 +135,7 @@ public class ShapelessRecipeHandler extends ShapedRecipeHandler {
|
||||
|
||||
private CachedShapelessRecipe shapelessRecipe(ShapelessRecipes recipe) {
|
||||
if (recipe.recipeItems == null) // because some mod subclasses actually do this
|
||||
return null;
|
||||
return null;
|
||||
|
||||
try {
|
||||
return new CachedShapelessRecipe(recipe.recipeItems, recipe.getRecipeOutput());
|
||||
@@ -150,8 +147,7 @@ public class ShapelessRecipeHandler extends ShapedRecipeHandler {
|
||||
public CachedShapelessRecipe forgeShapelessRecipe(ShapelessOreRecipe recipe) {
|
||||
ArrayList<Object> items = recipe.getInput();
|
||||
|
||||
for (Object item : items)
|
||||
if (item instanceof List && ((List<?>) item).isEmpty()) // ore handler, no ores
|
||||
for (Object item : items) if (item instanceof List && ((List<?>) item).isEmpty()) // ore handler, no ores
|
||||
return null;
|
||||
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user