1212import mekanism .api .chemical .slurry .Slurry ;
1313import mekanism .api .chemical .slurry .SlurryBuilder ;
1414import mekanism .api .gear .ModuleData ;
15+ import mekanism .api .recipes .ingredients .chemical .IGasIngredient ;
16+ import mekanism .api .recipes .ingredients .chemical .IInfusionIngredient ;
17+ import mekanism .api .recipes .ingredients .chemical .IPigmentIngredient ;
18+ import mekanism .api .recipes .ingredients .chemical .ISlurryIngredient ;
1519import mekanism .api .robit .RobitSkin ;
1620import net .minecraft .core .Registry ;
1721import net .minecraft .resources .ResourceKey ;
@@ -58,35 +62,63 @@ private static <T> ResourceKey<Registry<MapCodec<? extends T>>> codecRegistryKey
5862 /**
5963 * Gets the {@link ResourceKey} representing the name of the Registry for {@link Gas gases}.
6064 *
61- * @apiNote When registering {@link Gas gases} using {@link DeferredRegister <Gas> }, use this field to get access to the {@link ResourceKey}.
65+ * @apiNote When registering {@link Gas gases} using {@link DeferredRegister}, use this field to get access to the {@link ResourceKey}.
6266 * @since 10.4.0
6367 */
6468 public static final ResourceKey <Registry <Gas >> GAS_REGISTRY_NAME = registryKey (Gas .class , "gas" );
69+ /**
70+ * Gets the {@link ResourceKey} representing the name of the Registry for {@link IGasIngredient} ingredient type serializers.
71+ *
72+ * @apiNote When registering gas ingredient types using {@link DeferredRegister}, use this field to get access to the {@link ResourceKey}.
73+ * @since 10.6.0
74+ */
75+ public static final ResourceKey <Registry <MapCodec <? extends IGasIngredient >>> GAS_INGREDIENT_TYPE_REGISTRY_NAME = codecRegistryKey (IGasIngredient .class , "gas_ingredient_type" );
6576 /**
6677 * Gets the {@link ResourceKey} representing the name of the Registry for {@link InfuseType infuse types}.
6778 *
68- * @apiNote When registering {@link InfuseType infuse types} using {@link DeferredRegister <InfuseType> }, use this field to get access to the {@link ResourceKey}.
79+ * @apiNote When registering {@link InfuseType infuse types} using {@link DeferredRegister}, use this field to get access to the {@link ResourceKey}.
6980 * @since 10.4.0
7081 */
7182 public static final ResourceKey <Registry <InfuseType >> INFUSE_TYPE_REGISTRY_NAME = registryKey (InfuseType .class , "infuse_type" );
83+ /**
84+ * Gets the {@link ResourceKey} representing the name of the Registry for {@link IInfusionIngredient} ingredient type serializers.
85+ *
86+ * @apiNote When registering infusion ingredient types using {@link DeferredRegister}, use this field to get access to the {@link ResourceKey}.
87+ * @since 10.6.0
88+ */
89+ public static final ResourceKey <Registry <MapCodec <? extends IInfusionIngredient >>> INFUSION_INGREDIENT_TYPE_REGISTRY_NAME = codecRegistryKey (IInfusionIngredient .class , "infusion_ingredient_type" );
7290 /**
7391 * Gets the {@link ResourceKey} representing the name of the Registry for {@link Pigment pigments}.
7492 *
75- * @apiNote When registering {@link Pigment pigments} using {@link DeferredRegister <Pigment> }, use this field to get access to the {@link ResourceKey}.
93+ * @apiNote When registering {@link Pigment pigments} using {@link DeferredRegister}, use this field to get access to the {@link ResourceKey}.
7694 * @since 10.4.0
7795 */
7896 public static final ResourceKey <Registry <Pigment >> PIGMENT_REGISTRY_NAME = registryKey (Pigment .class , "pigment" );
97+ /**
98+ * Gets the {@link ResourceKey} representing the name of the Registry for {@link IPigmentIngredient} ingredient type serializers.
99+ *
100+ * @apiNote When registering pigment ingredient types using {@link DeferredRegister}, use this field to get access to the {@link ResourceKey}.
101+ * @since 10.6.0
102+ */
103+ public static final ResourceKey <Registry <MapCodec <? extends IPigmentIngredient >>> PIGMENT_INGREDIENT_TYPE_REGISTRY_NAME = codecRegistryKey (IPigmentIngredient .class , "pigment_ingredient_type" );
79104 /**
80105 * Gets the {@link ResourceKey} representing the name of the Registry for {@link Slurry sluries}.
81106 *
82- * @apiNote When registering {@link Slurry sluries} using {@link DeferredRegister <Slurry> }, use this field to get access to the {@link ResourceKey}.
107+ * @apiNote When registering {@link Slurry sluries} using {@link DeferredRegister}, use this field to get access to the {@link ResourceKey}.
83108 * @since 10.4.0
84109 */
85110 public static final ResourceKey <Registry <Slurry >> SLURRY_REGISTRY_NAME = registryKey (Slurry .class , "slurry" );
111+ /**
112+ * Gets the {@link ResourceKey} representing the name of the Registry for {@link ISlurryIngredient} ingredient type serializers.
113+ *
114+ * @apiNote When registering slurry ingredient types using {@link DeferredRegister}, use this field to get access to the {@link ResourceKey}.
115+ * @since 10.6.0
116+ */
117+ public static final ResourceKey <Registry <MapCodec <? extends ISlurryIngredient >>> SLURRY_INGREDIENT_TYPE_REGISTRY_NAME = codecRegistryKey (ISlurryIngredient .class , "slurry_ingredient_type" );
86118 /**
87119 * Gets the {@link ResourceKey} representing the name of the Registry for {@link ModuleData modules}.
88120 *
89- * @apiNote When registering {@link ModuleData modules} using {@link DeferredRegister <ModuleData> }, use this field to get access to the {@link ResourceKey}.
121+ * @apiNote When registering {@link ModuleData modules} using {@link DeferredRegister}, use this field to get access to the {@link ResourceKey}.
90122 * @since 10.4.0
91123 */
92124 @ SuppressWarnings ({"rawtypes" , "unchecked" })
@@ -100,8 +132,7 @@ private static <T> ResourceKey<Registry<MapCodec<? extends T>>> codecRegistryKey
100132 /**
101133 * Gets the {@link ResourceKey} representing the name of the Registry for {@link RobitSkin robit skin} serializers.
102134 *
103- * @apiNote When registering {@link RobitSkin robit skin} serializers using {@link DeferredRegister DeferredRegister< Codec<? extends RobitSkin>>}, use this field to
104- * get access to the {@link ResourceKey}.
135+ * @apiNote When registering {@link RobitSkin robit skin} serializers using {@link DeferredRegister}, use this field to get access to the {@link ResourceKey}.
105136 * @since 10.4.0
106137 */
107138 public static final ResourceKey <Registry <MapCodec <? extends RobitSkin >>> ROBIT_SKIN_SERIALIZER_REGISTRY_NAME = codecRegistryKey (RobitSkin .class , "robit_skin_serializer" );
@@ -116,6 +147,15 @@ private static <T> ResourceKey<Registry<MapCodec<? extends T>>> codecRegistryKey
116147 .defaultKey (rl ("empty" ))
117148 .sync (true )
118149 .create ();
150+ /**
151+ * Gets the Registry for {@link IGasIngredient} type serializers.
152+ *
153+ * @see #GAS_INGREDIENT_TYPE_REGISTRY_NAME
154+ * @since 10.6.0
155+ */
156+ public static final Registry <MapCodec <? extends IGasIngredient >> GAS_INGREDIENT_TYPES = new RegistryBuilder <>(GAS_INGREDIENT_TYPE_REGISTRY_NAME )
157+ .sync (true )
158+ .create ();
119159 /**
120160 * Gets the Registry for {@link InfuseType}.
121161 *
@@ -126,6 +166,15 @@ private static <T> ResourceKey<Registry<MapCodec<? extends T>>> codecRegistryKey
126166 .defaultKey (rl ("empty" ))
127167 .sync (true )
128168 .create ();
169+ /**
170+ * Gets the Registry for {@link IInfusionIngredient} type serializers.
171+ *
172+ * @see #INFUSION_INGREDIENT_TYPE_REGISTRY_NAME
173+ * @since 10.6.0
174+ */
175+ public static final Registry <MapCodec <? extends IInfusionIngredient >> INFUSION_INGREDIENT_TYPES = new RegistryBuilder <>(INFUSION_INGREDIENT_TYPE_REGISTRY_NAME )
176+ .sync (true )
177+ .create ();
129178 /**
130179 * Gets the Registry for {@link Pigment}.
131180 *
@@ -136,6 +185,15 @@ private static <T> ResourceKey<Registry<MapCodec<? extends T>>> codecRegistryKey
136185 .defaultKey (rl ("empty" ))
137186 .sync (true )
138187 .create ();
188+ /**
189+ * Gets the Registry for {@link IPigmentIngredient} type serializers.
190+ *
191+ * @see #PIGMENT_INGREDIENT_TYPE_REGISTRY_NAME
192+ * @since 10.6.0
193+ */
194+ public static final Registry <MapCodec <? extends IPigmentIngredient >> PIGMENT_INGREDIENT_TYPES = new RegistryBuilder <>(PIGMENT_INGREDIENT_TYPE_REGISTRY_NAME )
195+ .sync (true )
196+ .create ();
139197 /**
140198 * Gets the Registry for {@link Slurry}.
141199 *
@@ -146,6 +204,15 @@ private static <T> ResourceKey<Registry<MapCodec<? extends T>>> codecRegistryKey
146204 .defaultKey (rl ("empty" ))
147205 .sync (true )
148206 .create ();
207+ /**
208+ * Gets the Registry for {@link ISlurryIngredient} type serializers.
209+ *
210+ * @see #SLURRY_INGREDIENT_TYPE_REGISTRY_NAME
211+ * @since 10.6.0
212+ */
213+ public static final Registry <MapCodec <? extends ISlurryIngredient >> SLURRY_INGREDIENT_TYPES = new RegistryBuilder <>(SLURRY_INGREDIENT_TYPE_REGISTRY_NAME )
214+ .sync (true )
215+ .create ();
149216 /**
150217 * Gets the Registry for {@link ModuleData}.
151218 *
@@ -163,6 +230,9 @@ private static <T> ResourceKey<Registry<MapCodec<? extends T>>> codecRegistryKey
163230 */
164231 public static final Registry <MapCodec <? extends RobitSkin >> ROBIT_SKIN_SERIALIZER_REGISTRY = new RegistryBuilder <>(ROBIT_SKIN_SERIALIZER_REGISTRY_NAME ).create ();
165232
233+ //TODO - 1.20.5: Docs
234+ public static final ResourceLocation EMPTY_CHEMICAL_NAME = new ResourceLocation (MEKANISM_MODID , "empty" );
235+
166236 //TODO: Potentially define these with DeferredHolder for purposes of fully defining them outside of the API
167237 // would have some minor issues with how the empty stacks are declared
168238 /**
0 commit comments