Mod recipe writing not working in Forge 1.19

45 Views Asked by At

I'm trying to write a json file recipe for my mod MOD_ID = "leagues" but it doesn't seem to work.

Forge 1.19

resources/data/leagues/recipes/demogem.json

{
  "type": "minecraft:crafting_shaped",
  "key": {
    "R": {
      "item": "minecraft:red_dye"
    },
    "B": {
      "item": "minecraft:blaze_powder"
    },
    "A": {
      "item": "minecraft:apple"
    },
    "G": {
      "item": "minecraft:glass"
    }
  },
  "pattern": [
    " RB",
    "GAR",
    "GG "
  ],
  "result": {
    "item": "leagues:demogem",
    "count": 1
  }
}

However, when I run the game and try to craft the demogem using the items specified in the recipe, the demogem item does not appear. I've already checked that the mod id and item id are correct, the json syntax, recipe pattern, mod's code, but I can't seem to find the issue.

Here's a snippet of my mod's main class:

@Mod(Leagues.MOD_ID)
public class Leagues {
    public static final String MOD_ID = "leagues";
    private static final Logger LOGGER = LogUtils.getLogger();

    public Leagues() {
        IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();

        ModItems.register(modEventBus);

        modEventBus.addListener(this::commonSetup);

        MinecraftForge.EVENT_BUS.register(this);
    }

    private void commonSetup(final FMLCommonSetupEvent event) {}

    @Mod.EventBusSubscriber(modid = MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
    public static class ClientModEvents {
        @SubscribeEvent
        public static void onClientSetup(FMLClientSetupEvent event) {}
    }
}

Any help or guidance would be greatly appreciated. Thank you in advance!

0

There are 0 best solutions below