diff --git a/MineTweaker3-API/src/main/java/minetweaker/api/recipes/IRecipeManager.java b/MineTweaker3-API/src/main/java/minetweaker/api/recipes/IRecipeManager.java index 1c3dad3..c111cb8 100644 --- a/MineTweaker3-API/src/main/java/minetweaker/api/recipes/IRecipeManager.java +++ b/MineTweaker3-API/src/main/java/minetweaker/api/recipes/IRecipeManager.java @@ -23,6 +23,19 @@ public interface IRecipeManager { @ZenMethod public int remove(IIngredient output); + /** + * Adds a shaped recipe. + * + * @param output recipe output + * @param ingredients recipe ingredients + * @param mirrored indicates if the mirrored recipe should be valid too (optional) + */ + @ZenMethod + public void addShaped( + IItemStack output, + IIngredient[][] ingredients, + @Optional boolean mirrored); + /** * Adds a shaped recipe. * @@ -35,7 +48,7 @@ public interface IRecipeManager { public void addShaped( IItemStack output, IIngredient[][] ingredients, - @Optional IRecipeFunction function, + IRecipeFunction function, @Optional boolean mirrored); /** diff --git a/MineTweaker3-API/src/main/java/minetweaker/api/recipes/ShapedRecipe.java b/MineTweaker3-API/src/main/java/minetweaker/api/recipes/ShapedRecipe.java index b26b853..dfc8629 100644 --- a/MineTweaker3-API/src/main/java/minetweaker/api/recipes/ShapedRecipe.java +++ b/MineTweaker3-API/src/main/java/minetweaker/api/recipes/ShapedRecipe.java @@ -63,12 +63,6 @@ public class ShapedRecipe { this.width = width1; this.height = height1; this.mirrored = mirrored; - - /*System.out.println("ShapedRecipe width=" + width + ", height=" + height); - System.out.println("Ingredients: "); - for (int i = 0; i < this.ingredients.length; i++) { - System.out.println("(" + posx[i] + ", " + posy[i] + "): " + this.ingredients[i]); - }*/ } public int getWidth() { @@ -121,7 +115,7 @@ public class ShapedRecipe { for (int i = 0; i <= inventory.getWidth() - width; i++) { out: for (int j = 0; j <= inventory.getHeight() - height; j++) { for (int k = 0; k < ingredients.length; k++) { - IItemStack item = inventory.getStack(inventory.getWidth() - (posx[k] + i), posy[k] + j); + IItemStack item = inventory.getStack(inventory.getWidth() - (posx[k] + i) - 1, posy[k] + j); if (item == null) continue out; if (!ingredients[k].matches(item)) continue out; @@ -156,7 +150,7 @@ public class ShapedRecipe { for (int i = 0; i <= inventory.getWidth() - width; i++) { out: for (int j = 0; j <= inventory.getHeight() - height; j++) { for (int k = 0; k < ingredients.length; k++) { - IItemStack item = inventory.getStack(inventory.getWidth() - (posx[k] + i), posy[k] + j); + IItemStack item = inventory.getStack(inventory.getWidth() - (posx[k] + i) - 1, posy[k] + j); if (item == null) continue out; if (!ingredients[k].matches(item)) continue out; @@ -200,7 +194,7 @@ public class ShapedRecipe { if (transformed != stacks[i]) { if (mirrored) { inventory.setStack( - inventory.getWidth() - (offx + posx[i]), + inventory.getWidth() - (offx + posx[i]) - 1, offy + posy[i], transformed); } else { diff --git a/MineTweaker3-MC164-Main/src/main/java/minetweaker/mc164/MineTweakerCommand.java b/MineTweaker3-MC164-Main/src/main/java/minetweaker/mc164/MineTweakerCommand.java index 2565c1c..6d29eba 100644 --- a/MineTweaker3-MC164-Main/src/main/java/minetweaker/mc164/MineTweakerCommand.java +++ b/MineTweaker3-MC164-Main/src/main/java/minetweaker/mc164/MineTweakerCommand.java @@ -115,8 +115,8 @@ public class MineTweakerCommand implements ICommand { for (Map.Entry entry : FluidRegistry.getRegisteredFluids().entrySet()) { String message = " -- " + entry.getValue().getLocalizedName(); MineTweakerAPI.logger.logCommand(message); - sendChatMessage(icommandsender, "List generated; see minetweaker.log in your minecraft dir"); } + sendChatMessage(icommandsender, "List generated; see minetweaker.log in your minecraft dir"); } else if (arguments[0].equals("inventory")) { if (icommandsender instanceof EntityPlayer) { InventoryPlayer inventory = ((EntityPlayer) icommandsender).inventory; diff --git a/MineTweaker3-MC164-Main/src/main/java/minetweaker/mc164/recipes/MCRecipeManager.java b/MineTweaker3-MC164-Main/src/main/java/minetweaker/mc164/recipes/MCRecipeManager.java index 0f03e22..dfcece8 100644 --- a/MineTweaker3-MC164-Main/src/main/java/minetweaker/mc164/recipes/MCRecipeManager.java +++ b/MineTweaker3-MC164-Main/src/main/java/minetweaker/mc164/recipes/MCRecipeManager.java @@ -55,6 +55,11 @@ public class MCRecipeManager implements IRecipeManager { MineTweakerAPI.tweaker.apply(new ActionRemoveRecipes(toRemove, removeIndex)); return toRemove.size(); } + + @Override + public void addShaped(IItemStack output, IIngredient[][] ingredients, boolean mirrored) { + addShaped(output, ingredients, null, mirrored); + } @Override public void addShaped(IItemStack output, IIngredient[][] ingredients, IRecipeFunction function, boolean mirrored) { diff --git a/MineTweaker3-MC1710-Main/src/main/java/minetweaker/mc1710/MineTweakerCommand.java b/MineTweaker3-MC1710-Main/src/main/java/minetweaker/mc1710/MineTweakerCommand.java index dcbeef9..3acbec2 100644 --- a/MineTweaker3-MC1710-Main/src/main/java/minetweaker/mc1710/MineTweakerCommand.java +++ b/MineTweaker3-MC1710-Main/src/main/java/minetweaker/mc1710/MineTweakerCommand.java @@ -120,8 +120,8 @@ public class MineTweakerCommand implements ICommand { for (Map.Entry entry : FluidRegistry.getRegisteredFluids().entrySet()) { String message = " -- " + entry.getValue().getLocalizedName(); MineTweakerAPI.logger.logCommand(message); - sendChatMessage(icommandsender, "List generated; see minetweaker.log in your minecraft dir"); } + sendChatMessage(icommandsender, "List generated; see minetweaker.log in your minecraft dir"); } else if (arguments[0].equals("inventory")) { if (icommandsender instanceof EntityPlayer) { InventoryPlayer inventory = ((EntityPlayer) icommandsender).inventory; diff --git a/MineTweaker3-MC1710-Main/src/main/java/minetweaker/mc1710/recipes/MCRecipeManager.java b/MineTweaker3-MC1710-Main/src/main/java/minetweaker/mc1710/recipes/MCRecipeManager.java index d3cae23..3ba4e1c 100644 --- a/MineTweaker3-MC1710-Main/src/main/java/minetweaker/mc1710/recipes/MCRecipeManager.java +++ b/MineTweaker3-MC1710-Main/src/main/java/minetweaker/mc1710/recipes/MCRecipeManager.java @@ -55,6 +55,11 @@ public class MCRecipeManager implements IRecipeManager { MineTweakerAPI.tweaker.apply(new ActionRemoveRecipes(toRemove, removeIndex)); return toRemove.size(); } + + @Override + public void addShaped(IItemStack output, IIngredient[][] ingredients, boolean mirrored) { + addShaped(output, ingredients, null, mirrored); + } @Override public void addShaped(IItemStack output, IIngredient[][] ingredients, IRecipeFunction function, boolean mirrored) { @@ -67,7 +72,7 @@ public class MCRecipeManager implements IRecipeManager { IRecipe irecipe = RecipeConverter.convert(recipe); MineTweakerAPI.tweaker.apply(new ActionAddRecipe(irecipe)); } - + @Override public void addShapeless(IItemStack output, IIngredient[] ingredients, IRecipeFunction function) { if (output.getInternal() == null) { diff --git a/MineTweaker3-MC172-Main/src/main/java/minetweaker/mc172/MineTweakerCommand.java b/MineTweaker3-MC172-Main/src/main/java/minetweaker/mc172/MineTweakerCommand.java index 795052b..f38168a 100644 --- a/MineTweaker3-MC172-Main/src/main/java/minetweaker/mc172/MineTweakerCommand.java +++ b/MineTweaker3-MC172-Main/src/main/java/minetweaker/mc172/MineTweakerCommand.java @@ -120,8 +120,8 @@ public class MineTweakerCommand implements ICommand { for (Map.Entry entry : FluidRegistry.getRegisteredFluids().entrySet()) { String message = " -- " + entry.getValue().getLocalizedName(); MineTweakerAPI.logger.logCommand(message); - sendChatMessage(icommandsender, "List generated; see minetweaker.log in your minecraft dir"); } + sendChatMessage(icommandsender, "List generated; see minetweaker.log in your minecraft dir"); } else if (arguments[0].equals("inventory")) { if (icommandsender instanceof EntityPlayer) { InventoryPlayer inventory = ((EntityPlayer) icommandsender).inventory; diff --git a/MineTweaker3-MC172-Main/src/main/java/minetweaker/mc172/recipes/MCRecipeManager.java b/MineTweaker3-MC172-Main/src/main/java/minetweaker/mc172/recipes/MCRecipeManager.java index 2295aaf..943732e 100644 --- a/MineTweaker3-MC172-Main/src/main/java/minetweaker/mc172/recipes/MCRecipeManager.java +++ b/MineTweaker3-MC172-Main/src/main/java/minetweaker/mc172/recipes/MCRecipeManager.java @@ -55,6 +55,11 @@ public class MCRecipeManager implements IRecipeManager { MineTweakerAPI.tweaker.apply(new ActionRemoveRecipes(toRemove, removeIndex)); return toRemove.size(); } + + @Override + public void addShaped(IItemStack output, IIngredient[][] ingredients, boolean mirrored) { + addShaped(output, ingredients, null, mirrored); + } @Override public void addShaped(IItemStack output, IIngredient[][] ingredients, IRecipeFunction function, boolean mirrored) { diff --git a/MineTweaker3-MC172-Main/src/main/java/minetweaker/mc172/recipes/RecipeConverter.java b/MineTweaker3-MC172-Main/src/main/java/minetweaker/mc172/recipes/RecipeConverter.java index cdb7890..a7de1c6 100644 --- a/MineTweaker3-MC172-Main/src/main/java/minetweaker/mc172/recipes/RecipeConverter.java +++ b/MineTweaker3-MC172-Main/src/main/java/minetweaker/mc172/recipes/RecipeConverter.java @@ -74,8 +74,7 @@ public class RecipeConverter { int type = getRecipeType(ingredients); // construct recipe - if (type == TYPE_BASIC) { - System.out.println("Converted to basic recipe"); + if (type == TYPE_BASIC && !recipe.isMirrored()) { ItemStack[] basicIngredients = new ItemStack[recipe.getHeight() * recipe.getWidth()]; for (int i = 0; i < ingredients.length; i++) { basicIngredients[posx[i] + posy[i] * recipe.getWidth()] = (ItemStack) ingredients[i].getInternal(); @@ -83,7 +82,6 @@ public class RecipeConverter { return new ShapedRecipeBasic(basicIngredients, recipe); } else if (type == TYPE_ORE) { - System.out.println("Converted to ore recipe"); Object[] converted = new Object[recipe.getHeight() * recipe.getWidth()]; for (int i = 0; i < ingredients.length; i++) { converted[posx[i] + posy[i] * recipe.getWidth()] = ingredients[i].getInternal(); @@ -116,7 +114,6 @@ public class RecipeConverter { return new ShapedRecipeOre(rarguments.toArray(), recipe); } else { - System.out.println("Converted to advanced recipe"); return new ShapedRecipeAdvanced(recipe); } } diff --git a/MineTweaker3-MC172-Main/src/main/java/minetweaker/mc172/recipes/ShapedRecipeOre.java b/MineTweaker3-MC172-Main/src/main/java/minetweaker/mc172/recipes/ShapedRecipeOre.java index d919b51..eecf187 100644 --- a/MineTweaker3-MC172-Main/src/main/java/minetweaker/mc172/recipes/ShapedRecipeOre.java +++ b/MineTweaker3-MC172-Main/src/main/java/minetweaker/mc172/recipes/ShapedRecipeOre.java @@ -22,6 +22,10 @@ public class ShapedRecipeOre extends ShapedOreRecipe { public ShapedRecipeOre(Object[] contents, ShapedRecipe recipe) { super((ItemStack) recipe.getOutput().getInternal(), contents); + if (recipe.isMirrored()) { + setMirrored(true); + } + this.recipe = recipe; } diff --git a/MineTweaker3-Web/images/recipe_leggings_iron.png b/MineTweaker3-Web/images/recipe_leggings_iron.png new file mode 100644 index 0000000..22764f3 Binary files /dev/null and b/MineTweaker3-Web/images/recipe_leggings_iron.png differ diff --git a/MineTweaker3-Web/images/recipe_leggings_iron_bracket.png b/MineTweaker3-Web/images/recipe_leggings_iron_bracket.png new file mode 100644 index 0000000..132b2b9 Binary files /dev/null and b/MineTweaker3-Web/images/recipe_leggings_iron_bracket.png differ diff --git a/MineTweaker3-Web/images/recipe_mushroom_stew.png b/MineTweaker3-Web/images/recipe_mushroom_stew.png new file mode 100644 index 0000000..23ea12f Binary files /dev/null and b/MineTweaker3-Web/images/recipe_mushroom_stew.png differ diff --git a/MineTweaker3-Web/index.html b/MineTweaker3-Web/index.html new file mode 100644 index 0000000..2c7749c --- /dev/null +++ b/MineTweaker3-Web/index.html @@ -0,0 +1,73 @@ + + + + + + + + + + + + MineTweaker 3 + + + + + + + + + + + + + + +
+
+

MineTweaker 3

+

MineTweaker is a MineCraft mod that allows you to alter MineCraft to your needs. It's an essential tool to increase modpack quality and allows you to alter or remove crafting recipes, furnace recipes, mod machine recipes for supported mods, item renaming and ore dictionary modification.

+

Learn more »

+
+
+ +
+ +
+
+

Wiki

+

Follow the instructions and tutorials here.

+

Wiki »

+
+ +
+

GitHub

+

View the source and submit issues and suggestions here!

+

To GitHub »

+
+
+ +
+ +
+

© Stan Hebben. The mod can be used in any modpack as long as it is provided for free. Paid links, display on advertisement sites or otherwise using the mod for profit without written permission is strictly forbidden.

+
+
+ + + + + + + + \ No newline at end of file diff --git a/MineTweaker3-Web/js/ie10-viewport-bug-workaround.js b/MineTweaker3-Web/js/ie10-viewport-bug-workaround.js new file mode 100644 index 0000000..7f53b61 --- /dev/null +++ b/MineTweaker3-Web/js/ie10-viewport-bug-workaround.js @@ -0,0 +1,22 @@ +/*! + * IE10 viewport hack for Surface/desktop Windows 8 bug + * Copyright 2014 Twitter, Inc. + * Licensed under the Creative Commons Attribution 3.0 Unported License. For + * details, see http://creativecommons.org/licenses/by/3.0/. + */ + +// See the Getting Started docs for more information: +// http://getbootstrap.com/getting-started/#support-ie10-width + +(function () { + 'use strict'; + if (navigator.userAgent.match(/IEMobile\/10\.0/)) { + var msViewportStyle = document.createElement('style') + msViewportStyle.appendChild( + document.createTextNode( + '@-ms-viewport{width:auto!important}' + ) + ) + document.querySelector('head').appendChild(msViewportStyle) + } +})();