Record Class CookableTopping
java.lang.Object
java.lang.Record
com.petrolpark.compat.create.core.dough.topping.CookableTopping
- All Implemented Interfaces:
IDoughTopping
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.petrolpark.compat.create.core.dough.topping.IDoughTopping
IDoughTopping.Type<T extends IDoughTopping> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<CookableTopping> static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, CookableTopping> Fields inherited from interface com.petrolpark.compat.create.core.dough.topping.IDoughTopping
DIRECT_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionCookableTopping(String translationKey, List<net.minecraft.resources.ResourceLocation> textures, List<Integer> tints) Creates an instance of aCookableToppingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.<T> TintgetType()final inthashCode()Returns a hash code value for this object.net.minecraft.network.chat.Componentname()net.minecraft.resources.ResourceLocationtextureLocation(DoughData doughData) List<net.minecraft.resources.ResourceLocation> textures()Returns the value of thetexturesrecord component.tints()Returns the value of thetintsrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetranslationKeyrecord component.
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,CookableTopping> STREAM_CODEC
-
-
Constructor Details
-
CookableTopping
public CookableTopping(String translationKey, List<net.minecraft.resources.ResourceLocation> textures, List<Integer> tints) Creates an instance of aCookableToppingrecord class.- Parameters:
translationKey- the value for thetranslationKeyrecord componenttextures- the value for thetexturesrecord componenttints- the value for thetintsrecord component
-
-
Method Details
-
name
public net.minecraft.network.chat.Component name()- Specified by:
namein interfaceIDoughTopping
-
textureLocation
- Specified by:
textureLocationin interfaceIDoughTopping
-
getTint
- Specified by:
getTintin interfaceIDoughTopping
-
get
-
getType
- Specified by:
getTypein interfaceIDoughTopping
-
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). -
translationKey
Returns the value of thetranslationKeyrecord component.- Returns:
- the value of the
translationKeyrecord component
-
textures
Returns the value of thetexturesrecord component.- Returns:
- the value of the
texturesrecord component
-
tints
Returns the value of thetintsrecord component.- Returns:
- the value of the
tintsrecord component
-