FastCraft

FastCraft

138k Downloads

Broken Custom Shapeless Recipes

BetaBurnt opened this issue ยท 3 comments

commented

Description

Adding a recipe for turning 6 oak saplings into oak leaves does not work correctly. Instead of being 1 sapling on 6 separate slots in the craft table, it only registers as needing 6 in the same slot, and when you craft the leaves it only takes one sapling. As long as you leave the saplings where they are you can then make 6 leaves out of the 6 saplings, not 1 leaves block as it should be set up to do (and it shouldn't all be on one slot).
Works fine through the FastCraftGUI, but not in the normal crafting menu/table.

Reproduction

Add either of the attached to the recipes.yml and test the above. Tested with the saplings entered as one option with 6, or 6 options with 1 sapling each - both do the same on testing (on a server with nothing but FastCraft installed).

recipes.txt
recipes.1.txt
(rename to recipes.yml obviously...)

Details

  • FastCraft Version: 0.27.1
  • Server Version: Spigot 1.12 (Builds updated frequently, currently the latest available)
commented

This actually is the intended functionality. It doesn't state that anywhere, which can definitely make it confusing. The recipes are designed so you can specify that a slot in the crafting grid should have a specific number of items.

In recipes.1.txt, you would have to name the saplings differently. As far as YAML is concerned, if they're all named the same, it only knows about the last one. If two entries have the same name, the later one will override the earlier one.

I believe this should work:

sapling_to_leaves:
  type: shapeless
  ingredients:
    sapling1: [1, 'minecraft:sapling']
    sapling2: [1, 'minecraft:sapling']
    sapling3: [1, 'minecraft:sapling']
    sapling4: [1, 'minecraft:sapling']
    sapling5: [1, 'minecraft:sapling']
    sapling6: [1, 'minecraft:sapling']
  result: [1, 'minecraft:leaves']
commented

Putting something up on the plugin page (or in the top of the recipes.yml in the examples) that they need to be different just so it's clear would probably help, yeah xD Working now though, thanks!

commented

I definitely will ๐Ÿ˜…

I just played around with the recipe a little bit. If you want to get fancy and use YAML's reference feature, you can do something like this:

sapling_to_leaves:
  type: shapeless
  ingredients:
    sapling1: &sapling [1, 'minecraft:sapling']
    sapling2: *sapling
    sapling3: *sapling
    sapling4: *sapling
    sapling5: *sapling
    sapling6: *sapling
  result: [1, 'minecraft:leaves']