Jump to content

NukolLodda

Members
  • Posts

    1
  • Joined

  • Last visited

NukolLodda's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. So I'm new to Minecraft modding and I'm not too sure how to make custom shapeless recipes. Basically I have a machine called the alloy furnace with 3 inputs, but some recipes involving it only requires 2 inputs and as a result I want to make it shapeless. Along with that, the 3 input slots don't have any differences between them so it shouldn't matter which slot you put the item in. However, I want to make it so the recipes aren't hardcoded into my mod so instead json files are used instead. However I've yet to figure out how to allow for shapeless recipes. This is the code I've thought of so far, I'd imagine this probably looks like amateur stuff but this really is the best my almost deep fried brain can think of boolean hasIng = false; if (recipe.isPresent()) { for (int i = 0; i < entity.itemHandler.getSlots(); i++) { for (int j = 0; j < recipe.get().getIngredients().size(); j++) { if (entity.itemHandler.getStackInSlot(i) .equals(recipe.get().getIngredients().get(j).getItems()[0])) { hasIng = true; } } } } so if anyone can explain this to me, I'd really appreciate it.
×
×
  • Create New...

Important Information

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