Record Class TeamRewardAndInfoType
java.lang.Object
java.lang.Record
petrolpark.mc.library.core.data.reward.team.TeamRewardAndInfoType
- All Implemented Interfaces:
INamedRewardInfo.Type,IRewardInfo.Type,ITeamReward.Type
public record TeamRewardAndInfoType(String translationKey, com.mojang.serialization.MapCodec<? extends ITeamReward> teamRewardCodec, com.mojang.serialization.MapCodec<? extends IRewardInfo> infoCodec, net.minecraft.network.codec.StreamCodec<? super net.minecraft.network.RegistryFriendlyByteBuf,? extends IRewardInfo> infoStreamCodec)
extends Record
implements ITeamReward.Type, INamedRewardInfo.Type
-
Constructor Summary
ConstructorsConstructorDescriptionTeamRewardAndInfoType(String translationKey, com.mojang.serialization.MapCodec<? extends ITeamReward> teamRewardCodec, com.mojang.serialization.MapCodec<? extends IRewardInfo> infoCodec, net.minecraft.network.codec.StreamCodec<? super net.minecraft.network.RegistryFriendlyByteBuf, ? extends IRewardInfo> infoStreamCodec) Creates an instance of aTeamRewardAndInfoTyperecord 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.com.mojang.serialization.MapCodec<? extends ITeamReward> Returns the value of theteamRewardCodecrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetranslationKeyrecord component.
-
Constructor Details
-
TeamRewardAndInfoType
public TeamRewardAndInfoType(String translationKey, com.mojang.serialization.MapCodec<? extends ITeamReward> teamRewardCodec, com.mojang.serialization.MapCodec<? extends IRewardInfo> infoCodec, net.minecraft.network.codec.StreamCodec<? super net.minecraft.network.RegistryFriendlyByteBuf, ? extends IRewardInfo> infoStreamCodec) Creates an instance of aTeamRewardAndInfoTyperecord class.- Parameters:
translationKey- the value for thetranslationKeyrecord componentteamRewardCodec- the value for theteamRewardCodecrecord 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.- Specified by:
translationKeyin interfaceINamedRewardInfo.Type- Returns:
- the value of the
translationKeyrecord component
-
teamRewardCodec
Returns the value of theteamRewardCodecrecord component.- Specified by:
teamRewardCodecin interfaceITeamReward.Type- Returns:
- the value of the
teamRewardCodecrecord 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
-