Class FromArrayIngredientRandomizer
java.lang.Object
com.petrolpark.recipe.ingredient.randomizer.FromArrayIngredientRandomizer
- All Implemented Interfaces:
IngredientRandomizer,net.minecraft.world.level.storage.loot.LootContextUser
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal net.minecraft.world.item.crafting.Ingredient[]Fields inherited from interface com.petrolpark.recipe.ingredient.randomizer.IngredientRandomizer
CODEC -
Constructor Summary
ConstructorsConstructorDescriptionFromArrayIngredientRandomizer(net.minecraft.world.item.crafting.Ingredient[] ingredients) -
Method Summary
Modifier and TypeMethodDescriptioncom.google.gson.JsonArrayfromJsonArray(com.google.gson.JsonArray array) net.minecraft.world.item.crafting.Ingredientgenerate(net.minecraft.world.level.storage.loot.LootContext context) getType()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.level.storage.loot.LootContextUser
getReferencedContextParams, validate
-
Field Details
-
ingredients
public final net.minecraft.world.item.crafting.Ingredient[] ingredients
-
-
Constructor Details
-
FromArrayIngredientRandomizer
public FromArrayIngredientRandomizer(net.minecraft.world.item.crafting.Ingredient[] ingredients)
-
-
Method Details
-
generate
public net.minecraft.world.item.crafting.Ingredient generate(net.minecraft.world.level.storage.loot.LootContext context) - Specified by:
generatein interfaceIngredientRandomizer
-
getType
- Specified by:
getTypein interfaceIngredientRandomizer
-
asJsonArray
public com.google.gson.JsonArray asJsonArray() -
fromJsonArray
public static FromArrayIngredientRandomizer fromJsonArray(com.google.gson.JsonArray array) throws com.google.gson.JsonSyntaxException - Throws:
com.google.gson.JsonSyntaxException
-