Very complex problem with Cauldron[1.6.4]

Discussion in 'General Help' started by XsergeiX, Dec 22, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    XsergeiX

    So here is my problem. For my modded server i use Cauldron server core. On my server is installed mod named Immibis microblocks. Problem is that with tons of different ways cobblestone panels can be transformed into diamond panels or any other valuable resource because all microblocks id are identical, and then these microblocks can be crafted back into normal block and decomposed for resources. I decided to not allow players craft sliced blocks back into normal block. After some tests i spotted that if i remove all recipes from Bukkit.recipeIterator() then these blocks can't be cut or crafted in any workbench(other mods do add their own workbenches), but the problem is need to know what is item crafted from so i can remove only microblock recipes. Cancelling crafting event don't work for me, because you can still craft it in other crafting tables then. All microblock recipes are shapeless, but i can't cast them to ShapelessRecipes because they are instance of net.minecraftforge.cauldron.potion.CustomModRecipe.
    So is there anyone who knows how to get ingredients from CustomModRecipe? Or does anyone know better idea what should i do instead of that? Maybe anyone knows where i can get fixes for tranforming items with same id into eachother(1.6.4)?
     
  2. Offline

    87pen

  3. Offline

    XsergeiX

    @87pen, Maybe you miss understand me a bit, i need to remove recipe by it components. For easy example let's take item named stick, imagine, that my point is to remove all recipes that uses stcks(bows, fishing rod, paintings and etc). So i need to get somehow list or array of items being used in that recipe.
     
  4. Offline

    XsergeiX

    Time for shameless bumb
     
  5. Offline

    Mrs. bwfctower

    @XsergeiX Still do what @87pen said. Iterate through the recipes. Then check if it is a ShapedRecipe or ShapelessRecipe, and respectively call the #getIngredientMap() or #getIngredientList() methods. From there, you can check if there is a stick involved, and if so, remove the recipe.
     
Thread Status:
Not open for further replies.

Share This Page