Record Class RewardInfoType
java.lang.Object
java.lang.Record
petrolpark.mc.library.core.data.reward.info.RewardInfoType
- All Implemented Interfaces:
IRewardInfo.Type
public record RewardInfoType(String translationKey, com.mojang.serialization.MapCodec<? extends IRewardInfo> infoCodec, net.minecraft.network.codec.StreamCodec<? super net.minecraft.network.RegistryFriendlyByteBuf,? extends IRewardInfo> infoStreamCodec)
extends Record
implements IRewardInfo.Type
-
Constructor Summary
ConstructorsConstructorDescriptionRewardInfoType(String translationKey, com.mojang.serialization.MapCodec<? extends IRewardInfo> infoCodec, net.minecraft.network.codec.StreamCodec<? super net.minecraft.network.RegistryFriendlyByteBuf, ? extends IRewardInfo> infoStreamCodec) Creates an instance of aRewardInfoTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.com.mojang.serialization.MapCodec<? extends IRewardInfo> Returns the value of theinfoCodecrecord component.net.minecraft.network.codec.StreamCodec<? super net.minecraft.network.RegistryFriendlyByteBuf, ? extends IRewardInfo> Returns the value of theinfoStreamCodecrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetranslationKeyrecord component.
-
Constructor Details
-
RewardInfoType
public RewardInfoType(String translationKey, com.mojang.serialization.MapCodec<? extends IRewardInfo> infoCodec, net.minecraft.network.codec.StreamCodec<? super net.minecraft.network.RegistryFriendlyByteBuf, ? extends IRewardInfo> infoStreamCodec) Creates an instance of aRewardInfoTyperecord class.- Parameters:
translationKey- the value for thetranslationKeyrecord componentinfoCodec- the value for theinfoCodecrecord componentinfoStreamCodec- the value for theinfoStreamCodecrecord component
-
-
Method Details
-
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
-
infoCodec
Returns the value of theinfoCodecrecord component.- Specified by:
infoCodecin interfaceIRewardInfo.Type- Returns:
- the value of the
infoCodecrecord component
-
infoStreamCodec
public net.minecraft.network.codec.StreamCodec<? super net.minecraft.network.RegistryFriendlyByteBuf,? extends IRewardInfo> infoStreamCodec()Returns the value of theinfoStreamCodecrecord component.- Specified by:
infoStreamCodecin interfaceIRewardInfo.Type- Returns:
- the value of the
infoStreamCodecrecord component
-