java.lang.Object
net.darkhax.botanypots.common.api.command.generator.DataHelper

public class DataHelper extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.core.DefaultedRegistry<net.minecraft.world.level.block.Block>
     
    static final com.google.gson.Gson
     
    static final net.minecraft.core.DefaultedRegistry<net.minecraft.world.item.Item>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.google.gson.JsonArray
    array(com.google.gson.JsonElement... elements)
     
    static com.google.gson.JsonObject
    blockTag(net.minecraft.resources.ResourceLocation tag)
     
    static com.google.gson.JsonObject
    blockTag(net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> tag)
     
    static <T> com.google.gson.JsonElement
    encode(com.mojang.serialization.Codec<T> codec, T value)
     
    static com.google.gson.JsonElement
    ingredient(net.minecraft.world.item.crafting.Ingredient ingredient)
     
    static com.google.gson.JsonObject
     
    static com.google.gson.JsonObject
    ingredientBase(net.minecraft.resources.ResourceLocation type)
     
    static com.google.gson.JsonObject
    ingredients(com.google.gson.JsonObject... objects)
     
    static com.google.gson.JsonObject
    item(net.minecraft.world.item.Item item)
     
    static com.google.gson.JsonObject
     
    static com.google.gson.JsonObject
    requiresBlock(net.minecraft.world.level.block.Block block)
     
    static com.google.gson.JsonObject
    requiresItem(net.minecraft.world.item.Item item)
     
    static com.google.gson.JsonObject
    simpleDisplay(net.minecraft.world.level.block.Block block)
     
    static com.google.gson.JsonObject
    simpleDisplay(net.minecraft.world.level.block.Block block, boolean fluid)
     
    static com.google.gson.JsonElement
    stack(net.minecraft.world.item.ItemStack stack)
     
    static com.google.gson.JsonObject
    tag(net.minecraft.resources.ResourceLocation tag)
     
    static com.google.gson.JsonObject
    tag(net.minecraft.tags.TagKey<?> tag)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • GSON

      public static final com.google.gson.Gson GSON
    • BLOCKS

      public static final net.minecraft.core.DefaultedRegistry<net.minecraft.world.level.block.Block> BLOCKS
    • ITEMS

      public static final net.minecraft.core.DefaultedRegistry<net.minecraft.world.item.Item> ITEMS
  • Constructor Details

    • DataHelper

      public DataHelper()
  • Method Details

    • requiresBlock

      public static com.google.gson.JsonObject requiresBlock(net.minecraft.world.level.block.Block block)
    • requiresItem

      public static com.google.gson.JsonObject requiresItem(net.minecraft.world.item.Item item)
    • item

      public static com.google.gson.JsonObject item(net.minecraft.world.item.Item item)
    • tag

      public static com.google.gson.JsonObject tag(net.minecraft.tags.TagKey<?> tag)
    • tag

      public static com.google.gson.JsonObject tag(net.minecraft.resources.ResourceLocation tag)
    • stack

      public static com.google.gson.JsonElement stack(net.minecraft.world.item.ItemStack stack)
    • ingredient

      public static com.google.gson.JsonElement ingredient(net.minecraft.world.item.crafting.Ingredient ingredient)
    • simpleDisplay

      public static com.google.gson.JsonObject simpleDisplay(net.minecraft.world.level.block.Block block)
    • blockTag

      public static com.google.gson.JsonObject blockTag(net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> tag)
    • blockTag

      public static com.google.gson.JsonObject blockTag(net.minecraft.resources.ResourceLocation tag)
    • ingredients

      public static com.google.gson.JsonObject ingredients(com.google.gson.JsonObject... objects)
    • ingredientBase

      public static com.google.gson.JsonObject ingredientBase(net.minecraft.resources.ResourceLocation type)
    • ingredientBase

      public static com.google.gson.JsonObject ingredientBase(String type)
    • simpleDisplay

      public static com.google.gson.JsonObject simpleDisplay(net.minecraft.world.level.block.Block block, boolean fluid)
    • array

      public static com.google.gson.JsonArray array(com.google.gson.JsonElement... elements)
    • object

      public static com.google.gson.JsonObject object(String raw)
    • encode

      public static <T> com.google.gson.JsonElement encode(com.mojang.serialization.Codec<T> codec, T value)