Class StateIngredientHelper
java.lang.Object
at.petrak.hexcasting.common.recipe.ingredient.StateIngredientHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StateIngredientdeserialize(com.google.gson.JsonObject object) static StateIngredientof(Collection<net.minecraft.world.level.block.Block> blocks) static StateIngredientof(net.minecraft.resources.ResourceLocation id) static StateIngredientof(net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> tag) static StateIngredientof(net.minecraft.world.level.block.Block block) static StateIngredientof(net.minecraft.world.level.block.state.BlockState state) static StateIngredientread(net.minecraft.network.FriendlyByteBuf buffer) static net.minecraft.world.level.block.state.BlockStatereadBlockState(com.google.gson.JsonObject object) Reads the block state from the provided json object.static com.google.gson.JsonObjectserializeBlockState(net.minecraft.world.level.block.state.BlockState state) Writes data about the block state to the provided json object.static StateIngredienttagExcluding(net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> tag, StateIngredient... excluded) static List<net.minecraft.world.item.ItemStack>toStackList(StateIngredient input) Deprecated.static StateIngredienttryDeserialize(com.google.gson.JsonObject object) Deserializes a state ingredient, but removes air from its data, and returns null if the ingredient only matched air.
-
Constructor Details
-
StateIngredientHelper
public StateIngredientHelper()
-
-
Method Details
-
of
-
of
-
of
public static StateIngredient of(net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> tag) -
of
-
of
-
tagExcluding
public static StateIngredient tagExcluding(net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> tag, StateIngredient... excluded) -
deserialize
-
tryDeserialize
Deserializes a state ingredient, but removes air from its data, and returns null if the ingredient only matched air. -
read
-
serializeBlockState
public static com.google.gson.JsonObject serializeBlockState(net.minecraft.world.level.block.state.BlockState state) Writes data about the block state to the provided json object. -
readBlockState
public static net.minecraft.world.level.block.state.BlockState readBlockState(com.google.gson.JsonObject object) Reads the block state from the provided json object. -
toStackList
@Deprecated @Nonnull public static List<net.minecraft.world.item.ItemStack> toStackList(StateIngredient input) Deprecated.
-