so, I'm starting modding and I'm following the official documantation for forge: https://docs.minecraftforge.net, but in the registries part it is not working as it is in the docs:
public class ModItems {
private static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, DarkStarvation.MOD_ID);
public static final RegistryObject<Item> TEST_ITEM =
ITEMS.register("test_item", () -> new Item(new Item.Properties()));
public DarkStarvation(FMLJavaModLoadingContext context) {
ITEMS.register(context.getModEventBus());
}
}
in 'public DarkStarvation(...' the DarkStarvation has this error: Invalid method declaration; return type required
and the getModEventBus(): Cannot resolve method 'getModEventBus' in 'FMLJavaModLoadingContext'
please help, I asked gpt but it is saying that I'm using an old method, but I'm following the latest version of Forge Docs???