Changes

871 bytes removed ,  20:07, 13 June 2022
Update to 1.19
Line 67: Line 67:  
=== RecipeType ===
 
=== RecipeType ===
   −
<code>RecipeType</code> is another interface; however, it does not store any data itself. It is simply a non-forge wrapped registry object which represents the category the <code>Recipe</code> implementation belongs to. As such, it only needs to be supplied its registry name. This can be registered via <code>RecipeType#register</code> by either static initialization or deferring the registration until <code>FMLCommonSetupEvent</code>.
+
<code>RecipeType</code> is another interface; however, it does not store any data itself. It is simply a forge-wrapped registry object which represents the category the <code>Recipe</code> implementation belongs to.
 
  −
{{Tip/Warning|If you choose to defer the registration, you will need to register the event within the synchronous work queue provided by <code>#enqueueWork</code> since <code>RecipeType#register</code> is not threadsafe.}}
      
=== RecipeSerializer ===
 
=== RecipeSerializer ===
   −
<code>RecipeSerializer</code> is an interface which takes some JSON and transforms it into a <code>Recipe</code>. It is also responsible for syncing the recipe data to the client. This is a forge wrapped registry object; however, since it is an interface, there is a bit more work needed for ease of implementation. This is because <code>RecipeSerializer</code> extends <code>IForgeRegistryEntry</code> which has three abstract methods. For ease of use, the implementation should extends <code>ForgeRegistryEntry<RecipeSerializer<?>></code> such that you do not need to implement these methods yourself.
+
<code>RecipeSerializer</code> is an interface which takes some JSON and transforms it into a <code>Recipe</code>. It is also responsible for syncing the recipe data to the client.
    
There are only three methods within <code>RecipeSerializer</code>, but they all must be implemented:
 
There are only three methods within <code>RecipeSerializer</code>, but they all must be implemented: