Record Class SimpleTopping
java.lang.Object
java.lang.Record
com.petrolpark.compat.create.core.dough.topping.SimpleTopping
- All Implemented Interfaces:
IDoughTopping
public record SimpleTopping(String translationKey, net.minecraft.resources.ResourceLocation textureLocation, int tint)
extends Record
implements 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<SimpleTopping> static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, SimpleTopping> Fields inherited from interface com.petrolpark.compat.create.core.dough.topping.IDoughTopping
DIRECT_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionSimpleTopping(String translationKey, net.minecraft.resources.ResourceLocation textureLocation, int tint) Creates an instance of aSimpleToppingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intgetType()final inthashCode()Returns a hash code value for this object.net.minecraft.network.chat.Componentname()net.minecraft.resources.ResourceLocationReturns the value of thetextureLocationrecord component.net.minecraft.resources.ResourceLocationtextureLocation(DoughData doughData) inttint()Returns the value of thetintrecord 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,SimpleTopping> STREAM_CODEC
-
-
Constructor Details
-
SimpleTopping
public SimpleTopping(String translationKey, net.minecraft.resources.ResourceLocation textureLocation, int tint) Creates an instance of aSimpleToppingrecord class.- Parameters:
translationKey- the value for thetranslationKeyrecord componenttextureLocation- the value for thetextureLocationrecord componenttint- the value for thetintrecord 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
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
translationKey
Returns the value of thetranslationKeyrecord component.- Returns:
- the value of the
translationKeyrecord component
-
textureLocation
public net.minecraft.resources.ResourceLocation textureLocation()Returns the value of thetextureLocationrecord component.- Returns:
- the value of the
textureLocationrecord component
-
tint
public int tint()Returns the value of thetintrecord component.- Returns:
- the value of the
tintrecord component
-