Jump to content

Huntk23

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Huntk23

  1. Wow I feel like an idiot now lol I see what's wrong now- rec.items = new ItemStack[9]; int w = (Integer) ModLoader.getPrivateValue(ShapedOreRecipe.class, (ShapedOreRecipe) irecipe, 4); int h = (Integer) ModLoader.getPrivateValue(ShapedOreRecipe.class, (ShapedOreRecipe) irecipe, 5); if (w*h > 9) continue; Object temp[] = (Object[]) ModLoader.getPrivateValue(ShapedOreRecipe.class, (ShapedOreRecipe) irecipe, 3); for (int j = 0 ; j < temp.length ; j++) { if (temp[j] instanceof ArrayList) { List reqitems = (List) temp[j]; for (int k = 0 ; k < reqitems.size(); k++) { int x = k; int y = j; if (temp.length <= 3) y = j * 3; rec.items[y+k] = (ItemStack) reqitems.get(k); } It's adding a ItemStack[6] to a ItemStack[9] therefore outputting the wrong recipe. Thanks for that clarification LexManos. Ugh brain-dead after work.
  2. Sorry for slow reply, always so busy with work. Okay, may have been wrong to think it was Forge. I don't know why but it seems in RecipesTools.java the recipe was incorrect on Line 5 private String[][] recipePatterns = new String[][] {{"XXX", " # ", " # "}, {"X", "#", "#"}, {"XX", "X#", " #"}, {"XX", " #", " #"}}; Recipe 0 = Picaxe Recipe 1 = Shovel Recipe 2 = Hatchet Recipe 3 = Hoe The recipes are missing spaces and should look like this: private String[][] recipePatterns = new String[][] {{"XXX", " # ", " # "}, {"X", "#", "#"}, {"XX ", "X# ", " # "}, {"XX ", " # ", " # "}}; This fixed my issue when CraftingManager called for these recipes and it ended up making them an ItemStack[6] when it should have been ItemStack[9] So I've been out of the loop for a while and only mess around with Minecraft for java practice as I am a C# programmer, is this a MCP issue or actual Minecraft issue? or did I somehow get this isolated to me only?
  3. I'm not sure if this is a bug with Forge but I suspect it may be. When I call the ShapedOreRecipe for a hatchet or hoe, it seems to be returning an ItemStack[6] with an incorrect recipe. I've only had a short time to look into it but I have gotten as far as OreDict/ShapeOreRecipe class getting a bad value from CraftingManager. I can post more details when I get home from work, but was wondering if anyone else has ran into or seen this issue? I've searched and haven't really found anything relating. I know OreDict is rather new as well.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.