Class DataHelper
java.lang.Object
net.darkhax.botanypots.common.api.command.generator.DataHelper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.gson.JsonArrayarray(com.google.gson.JsonElement... elements) static com.google.gson.JsonObjectblockTag(net.minecraft.resources.ResourceLocation tag) static com.google.gson.JsonObjectblockTag(net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> tag) static <T> com.google.gson.JsonElementencode(com.mojang.serialization.Codec<T> codec, T value) static com.google.gson.JsonElementingredient(net.minecraft.world.item.crafting.Ingredient ingredient) static com.google.gson.JsonObjectingredientBase(String type) static com.google.gson.JsonObjectingredientBase(net.minecraft.resources.ResourceLocation type) static com.google.gson.JsonObjectingredients(com.google.gson.JsonObject... objects) static com.google.gson.JsonObjectitem(net.minecraft.world.item.Item item) static com.google.gson.JsonObjectstatic com.google.gson.JsonObjectrequiresBlock(net.minecraft.world.level.block.Block block) static com.google.gson.JsonObjectrequiresItem(net.minecraft.world.item.Item item) static com.google.gson.JsonObjectsimpleDisplay(net.minecraft.world.level.block.Block block) static com.google.gson.JsonObjectsimpleDisplay(net.minecraft.world.level.block.Block block, boolean fluid) static com.google.gson.JsonElementstack(net.minecraft.world.item.ItemStack stack) static com.google.gson.JsonObjecttag(net.minecraft.resources.ResourceLocation tag) static com.google.gson.JsonObjecttag(net.minecraft.tags.TagKey<?> tag)
-
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
-
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
-
encode
public static <T> com.google.gson.JsonElement encode(com.mojang.serialization.Codec<T> codec, T value)
-