Class FromArrayIngredientRandomizer

java.lang.Object
com.petrolpark.recipe.ingredient.randomizer.FromArrayIngredientRandomizer
All Implemented Interfaces:
IngredientRandomizer, net.minecraft.world.level.storage.loot.LootContextUser

public class FromArrayIngredientRandomizer extends Object implements IngredientRandomizer
  • 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:
      generate in interface IngredientRandomizer
    • getType

      public IngredientRandomizerType getType()
      Specified by:
      getType in interface IngredientRandomizer
    • 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