Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.12] Crafting Recipe class question


SirBassington
 Share

Recommended Posts

Ok so I'm updating my mod from 1.11 to 1.12 & I understandthe new system in play with the .json format. But I have a minor question about it. Since 1.12 now allows for crafting recipes to be made in .json files, is it okay to completely remove my RecipeManager class that housed all the code of my now non-functional recipes from 1.11 and just replace each recipe with it's own .json file?

I ask because I would hate to have an entire file that's no longer needed since it's only goal was to add crafting recipes since 1.7.10 until now.

Between being a Gamer, a Furry, and a Modder who one day wants to go into Game Dev., time is an absolute waste. ~SirBassington

Link to comment
Share on other sites

I have the same question. It'd be nice to know what are the plans.

 

I think, though I could be wrong, that they are working on making another way for adding crafting recipes as the TODO comments talk about making IRecipe a registry. If whatever comes new doesn't use the same name for methods (addShapedRecipe, addShapelessRecipe, etc), then your RecipeManager class would need a substantial re-writing. For the moment being I think it is better to keep it for reference and re-write it when the time comes, if it ever comes. If once this forge version comes out of beta it results that there is no similar way to add recipes in code then I would remove it. But I'd keep it for now. Just for reference until then.

Edited by ctbe
Add info.
Link to comment
Share on other sites

4 hours ago, ctbe said:

I have the same question. It'd be nice to know what are the plans.

 

I think, though I could be wrong, that they are working on making another way for adding crafting recipes as the TODO comments talk about making IRecipe a registry. If whatever comes new doesn't use the same name for methods (addShapedRecipe, addShapelessRecipe, etc), then your RecipeManager class would need a substantial re-writing. For the moment being I think it is better to keep it for reference and re-write it when the time comes, if it ever comes. If once this forge version comes out of beta it results that there is no similar way to add recipes in code then I would remove it. But I'd keep it for now. Just for reference until then.

 

I'm pretty sure the recipe system we have now is what those comments are talking about, they just haven't been updated yet.

 

Now that IRecipe extends IForgeRegistryEntry, you can add a recipe in code by registering an IRecipe object with ForgeRegistries.RECIPES; just like any other IForgeRegistryEntry. I think using the JSON system where possible is preferred, though.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

Ok so I took the time to mess around with my setup some more and have decided to keep the code in my mod but make the 200ish recipes I had from before but in .json format, what a pain. I have decided on keeping the old code in an unused state and continue with the changes as Forge for 1.12 becomes more stable and then decide later if I want to permanently delete it after configuring it a bit more obviously or keep it for reference for whatever the cause in the future.

 

Thank you all so much for your input and thoughts!

Between being a Gamer, a Furry, and a Modder who one day wants to go into Game Dev., time is an absolute waste. ~SirBassington

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • The Chunk#isLoaded seems to be depreciated... what's the new way of doing this? The Chunk#loaded field is private, and the Chunk#getStatus method always returns ChunkStatus.FULL... I can get the chunk with entity.level.getChunk(entity.getBlockPosition()), but what then?
    • 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    • I don't really know why, if someone could give me a hand and let me know what's wrong that would be great. Cheers   ---- Minecraft Crash Report ---- WARNING: coremods are present:   Inventory Tweaks Coremod (InventoryTweaks-1.63.jar)   MovingWorldCore (movingworld-1.12-6.353-full.jar)   Quark Plugin (Quark-r1.6-179.jar)   IvToolkit (IvToolkit-1.3.3-1.12.jar)   weaponlib (mw_2.0-0.4.4.6_mc1.12.2.jar)   ApotheosisCore (Apotheosis-1.12.2-1.12.5.jar) Contact their authors BEFORE contacting forge // Don't do that. Time: 9/29/21 4:48 AM Description: Initializing game java.lang.NoClassDefFoundError: net/minecraftforge/fml/common/registry/IForgeRegistryEntry     at java.lang.Class.forName0(Native Method)     at java.lang.Class.forName(Class.java:348)     at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:539)     at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:497)     at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)     at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)     at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)     at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)     at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)     at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)     at com.google.common.eventbus.EventBus.post(EventBus.java:217)     at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)     at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:497)     at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)     at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)     at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)     at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)     at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)     at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)     at com.google.common.eventbus.EventBus.post(EventBus.java:217)     at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136)     at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:595)     at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:232)     at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:467)     at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:378)     at net.minecraft.client.main.Main.main(SourceFile:123)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:497)     at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)     at net.minecraft.launchwrapper.Launch.main(Launch.java:28) Caused by: java.lang.ClassNotFoundException: net.minecraftforge.fml.common.registry.IForgeRegistryEntry     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)     ... 38 more Caused by: java.lang.NullPointerException A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Client thread Stacktrace:     at java.lang.Class.forName0(Native Method)     at java.lang.Class.forName(Class.java:348)     at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:539)     at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:497)     at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)     at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)     at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)     at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)     at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)     at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)     at com.google.common.eventbus.EventBus.post(EventBus.java:217)     at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)     at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:497)     at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)     at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)     at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)     at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)     at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)     at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)     at com.google.common.eventbus.EventBus.post(EventBus.java:217)     at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136)     at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:595)     at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:232)     at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:467) -- Initialization -- Details: Stacktrace:     at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:378)     at net.minecraft.client.main.Main.main(SourceFile:123)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:497)     at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)     at net.minecraft.launchwrapper.Launch.main(Launch.java:28) -- System Details -- Details:     Minecraft Version: 1.12.2     Operating System: Windows 10 (amd64) version 10.0     Java Version: 1.8.0_51, Oracle Corporation     Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation     Memory: 226393024 bytes (215 MB) / 536870912 bytes (512 MB) up to 2147483648 bytes (2048 MB)     JVM Flags: 8 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M     IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0     FML: MCP 9.42 Powered by Forge 14.23.5.2855 Optifine OptiFine_1.12.2_HD_U_G5 47 mods loaded, 47 mods active     States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored     | State | ID                                           | Version                  | Source                                             | Signature                                |     |:----- |:-------------------------------------------- |:------------------------ |:-------------------------------------------------- |:---------------------------------------- |     | LC    | minecraft                                    | 1.12.2                   | minecraft.jar                                      | None                                     |     | LC    | mcp                                          | 9.42                     | minecraft.jar                                      | None                                     |     | LC    | FML                                          | 8.0.99.99                | forge-1.12.2-14.23.5.2855.jar                      | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | LC    | forge                                        | 14.23.5.2855             | forge-1.12.2-14.23.5.2855.jar                      | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | LC    | ivtoolkit                                    | 1.3.3-1.12               | minecraft.jar                                      | None                                     |     | LC    | com.elytradev.movingworld.common.asm.coremod |                          | minecraft.jar                                      | None                                     |     | LC    | biomesoplenty                                | 7.0.1.2444               | BiomesOPlenty-1.12.2-7.0.1.2444-universal.jar      | None                                     |     | LC    | craftstudioapi                               | 1.0.0                    | CraftStudio-1.0.0.93-mc1.12-alpha.jar              | None                                     |     | LC    | animania                                     | 2.0.3.28                 | animania-1.12.2-base-2.0.3.28.jar                  | None                                     |     | LC    | placebo                                      | 1.6.0                    | Placebo-1.12.2-1.6.0.jar                           | None                                     |     | LC    | apotheosis                                   | 1.12.4                   | Apotheosis-1.12.2-1.12.5.jar                       | None                                     |     | LC    | jei                                          | 4.16.1.301               | jei_1.12.2-4.16.1.301.jar                          | None                                     |     | LC    | quark                                        | r1.6-179                 | Quark-r1.6-179.jar                                 | None                                     |     | LC    | autoreglib                                   | 1.3-32                   | AutoRegLib-1.3-32.jar                              | None                                     |     | LC    | codechickenlib                               | 3.2.3.358                | CodeChickenLib-1.12.2-3.2.3.358-universal.jar      | f1850c39b2516232a2108a7bd84d1cb5df93b261 |     | LC    | redstoneflux                                 | 2.1.1                    | Redstone-Flux-API-1.12.2.jar                       | None                                     |     | LC    | brandonscore                                 | 2.4.20                   | BrandonsCore-1.12.2-2.4.20.162-universal.jar       | None                                     |     | LC    | controlling                                  | 3.0.10                   | Controlling-3.0.10.jar                             | None                                     |     | LC    | craft_gunpowder_11                           | 1.1.0                    | CraftableGunpowder_1-1.jar                         | None                                     |     | LC    | cucumber                                     | 1.1.3                    | Cucumber-1.12.2-1.1.3.jar                          | None                                     |     | LC    | movingworld                                  | 1.12-6.353               | movingworld-1.12-6.353-full.jar                    | None                                     |     | LC    | davincisvessels                              | @DVESSELSVER@            | davincisvessels-1.12-6.340-full.jar                | None                                     |     | LC    | ptrmodellib                                  | 1.0.5                    | PTRLib-1.0.5.jar                                   | None                                     |     | LC    | props                                        | 2.6.3.7                  | Decocraft-2.6.3.7_1.12.2.jar                       | None                                     |     | LC    | draconicevolution                            | 2.3.28                   | Draconic-Evolution-1.12.2-2.3.28.354-universal.jar | None                                     |     | LC    | reccomplex                                   | 1.4.8.2                  | RecurrentComplex-1.4.8.2.jar                       | None                                     |     | LC    | dynamictrees                                 | 1.12.2-0.9.25            | DynamicTrees-1.12.2-0.9.25.jar                     | None                                     |     | LC    | ftblib                                       | 5.4.7.2                  | FTBLib-5.4.7.2.jar                                 | None                                     |     | LC    | itemfilters                                  | 1.0.4.2                  | ItemFilters-1.0.4.2.jar                            | None                                     |     | LC    | ftbquests                                    | 1202.9.0.15              | FTBQuests-1202.9.0.15.jar                          | None                                     |     | LC    | cfm                                          | 6.3.1                    | furniture-6.3.1-1.12.2.jar                         | None                                     |     | LC    | gravestone                                   | 1.10.3                   | gravestone-1.10.3.jar                              | None                                     |     | LC    | waila                                        | 1.8.26                   | Hwyla-1.8.26-B41_1.12.2.jar                        | None                                     |     | LC    | inventorytweaks                              | 1.63+release.109.220f184 | InventoryTweaks-1.63.jar                           | 55d2cd4f5f0961410bf7b91ef6c6bf00a766dcbe |     | LC    | journeymap                                   | 1.12.2-5.7.1             | journeymap-1.12.2-5.7.1.jar                        | None                                     |     | LC    | numina                                       | 1.12.2-1.0.38            | Numina-1.12.2-1.0.38.jar                           | None                                     |     | LC    | refinedstorage                               | 1.6.15                   | refinedstorage-1.6.15.jar                          | 57893d5b90a7336e8c63fe1c1e1ce472c3d59578 |     | LC    | powersuits                                   | 1.12.2-1.0.46            | ModularPowersuits-1.12.2-1.0.46.jar                | None                                     |     | LC    | mw                                           | 0.4.4.6                  | mw_2.0-0.4.4.6_mc1.12.2.jar                        | None                                     |     | LC    | mysticalagriculture                          | 1.7.5                    | MysticalAgriculture-1.12.2-1.7.5.jar               | None                                     |     | LC    | mysticalagradditions                         | 1.3.2                    | MysticalAgradditions-1.12.2-1.3.2.jar              | None                                     |     | LC    | roguelike                                    | 1.8.0                    | RoguelikeDungeons-1.12.2-1.8.0.jar                 | None                                     |     | LC    | solarflux                                    | 12.4.11                  | SolarFluxReborn-1.12.2-12.4.11.jar                 | 9f5e2a811a8332a842b34f6967b7db0ac4f24856 |     | LC    | mo                                           | 1.0                      | sulfur-potassium-1.12-1.1.jar                      | None                                     |     | LC    | tektopia                                     | 1.1.0                    | tektopia-1.1.0.jar                                 | None                                     |     | L     | waystones                                    | 4.0.4                    | Waystones_1.12-4.0.4.jar                           | None                                     |     | L     | worldedit                                    | 6.1.10                   | worldedit-forge-mc1.12.2-6.1.10-dist.jar           | None                                     |     Loaded coremods (and transformers):  Inventory Tweaks Coremod (InventoryTweaks-1.63.jar)   invtweaks.forge.asm.ContainerTransformer MovingWorldCore (movingworld-1.12-6.353-full.jar)    Quark Plugin (Quark-r1.6-179.jar)   vazkii.quark.base.asm.ClassTransformer IvToolkit (IvToolkit-1.3.3-1.12.jar)    weaponlib (mw_2.0-0.4.4.6_mc1.12.2.jar)   com.vicmatskiv.weaponlib.core.WeaponlibClassTransformer ApotheosisCore (Apotheosis-1.12.2-1.12.5.jar)   shadows.ApotheosisTransformer     GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 471.96' Renderer: 'NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2'     Launched Version: 1.12.2-forge-14.23.5.2855     LWJGL: 2.9.4     OpenGL: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2 GL version 4.6.0 NVIDIA 471.96, NVIDIA Corporation     GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported.     Using VBOs: Yes     Is Modded: Definitely; Client brand changed to 'fml,forge'     Type: Client (map_client.txt)     Resource Packs:      Current Language: English (US)     Profiler Position: N/A (disabled)     CPU: 20x Intel(R) Core(TM) i9-10900K CPU @ 3.70GHz     OptiFine Version: OptiFine_1.12.2_HD_U_G5     OptiFine Build: 20210124-142939     Render Distance Chunks: 8     Mipmaps: 4     Anisotropic Filtering: 1     Antialiasing: 0     Multitexture: false     Shaders: SEUS-Renewed-v1.0.1.zip     OpenGlVersion: 4.6.0 NVIDIA 471.96     OpenGlRenderer: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2     OpenGlVendor: NVIDIA Corporation     CpuCount: 20
    • 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    • so uh, i created a forge server to run on my pc, and followed a lot of steps seeing other threads, and trying them, but the mods folder is not appearing, and the vanilla server keeps appearing as vanilla, i de-installed and installed several times
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.