Posted October 18, 201312 yr As far as I know, there is no way to access "width" and "height" in ShapedOreRecipe.java Can someone add a method to get those (or simply make them public)?
October 27, 201312 yr You can access getRecipeSize(), which can give you the answer for 1x1, 2x2 and 3x3 recipes (it returns 1, 4 or 9 in those cases). For everything else ... public static int[] recipeSize(ShapedOreRecipe recipe) { int width = ObfuscationReflectionHelper.getPrivateValue(ShapedOreRecipe.class, recipe, "width"); int height = ObfuscationReflectionHelper.getPrivateValue(ShapedOreRecipe.class, recipe, "height"); return new int[]{width, height}; } ItemBlock is not a Block ItemStack is not an Item Damage value is not metadata Stop confusing them.
November 5, 201311 yr why? I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.