Record Class CreativeTabIngredient
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.ingredient.CreativeTabIngredient
- All Implemented Interfaces:
IngredientSupplierKJS,KubeJSIngredient,ItemPredicate,Predicate<net.minecraft.world.item.ItemStack>,net.neoforged.neoforge.common.crafting.ICustomIngredient
public record CreativeTabIngredient(net.minecraft.world.item.CreativeModeTab tab)
extends Record
implements KubeJSIngredient
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<CreativeTabIngredient> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, CreativeTabIngredient> Fields inherited from interface dev.latvian.mods.kubejs.item.ItemPredicate
ALL, NONE, TYPE_INFO -
Constructor Summary
ConstructorsConstructorDescriptionCreativeTabIngredient(net.minecraft.world.item.CreativeModeTab tab) Creates an instance of aCreativeTabIngredientrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.net.neoforged.neoforge.common.crafting.IngredientType<?> getType()final inthashCode()Returns a hash code value for this object.net.minecraft.world.item.CreativeModeTabtab()Returns the value of thetabrecord component.booleantest(@Nullable net.minecraft.world.item.ItemStack stack) final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.common.crafting.ICustomIngredient
toVanillaMethods inherited from interface dev.latvian.mods.kubejs.item.ItemPredicate
kjs$asIngredient, kjs$getDisplayStacks, kjs$getFirst, kjs$getItemIds, kjs$getItemStream, kjs$getItemTypes, kjs$getStackArray, kjs$getStacks, kjs$isWildcard, kjs$testItemMethods inherited from interface dev.latvian.mods.kubejs.ingredient.KubeJSIngredient
getItems, isSimple, kjs$canBeUsedForMatching
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,CreativeTabIngredient> STREAM_CODEC
-
-
Constructor Details
-
CreativeTabIngredient
public CreativeTabIngredient(net.minecraft.world.item.CreativeModeTab tab) Creates an instance of aCreativeTabIngredientrecord class.- Parameters:
tab- the value for thetabrecord component
-
-
Method Details
-
getType
public net.neoforged.neoforge.common.crafting.IngredientType<?> getType()- Specified by:
getTypein interfacenet.neoforged.neoforge.common.crafting.ICustomIngredient
-
test
public boolean test(@Nullable @Nullable net.minecraft.world.item.ItemStack stack) - Specified by:
testin interfacenet.neoforged.neoforge.common.crafting.ICustomIngredient- Specified by:
testin interfaceItemPredicate- Specified by:
testin interfaceKubeJSIngredient- Specified by:
testin interfacePredicate<net.minecraft.world.item.ItemStack>
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
tab
public net.minecraft.world.item.CreativeModeTab tab()Returns the value of thetabrecord component.- Returns:
- the value of the
tabrecord component
-