Record Class IngredientTypeAdapter.IngredientType<T extends IngredientLogic<T>>
java.lang.Object
java.lang.Record
net.darkhax.bookshelf.common.impl.registry.adapter.IngredientTypeAdapter.IngredientType<T>
- Type Parameters:
T- The type of the custom ingredient logic.- Record Components:
codec- A codec that reads the ingredient from map data, like JSON.stream- A ByteBuf codec that reads the ingredient from network data.
- Enclosing class:
IngredientTypeAdapter
public static record IngredientTypeAdapter.IngredientType<T extends IngredientLogic<T>>(com.mojang.serialization.MapCodec<T extends IngredientLogic<T>> codec, net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, T extends IngredientLogic<T>> stream)
extends Record
An internal type that holds a map codec and the ByteBuf codec for a custom ingredient type.
-
Constructor Summary
ConstructorsConstructorDescriptionIngredientType(com.mojang.serialization.MapCodec<T> codec, net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, T> stream) Creates an instance of aIngredientTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<T> codec()Returns the value of thecodecrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, T> stream()Returns the value of thestreamrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
IngredientType
-
-
Method Details
-
toString
-
hashCode
-
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). -
codec
-
stream
-