Record Class OneTimeTeamReward.Team
java.lang.Object
java.lang.Record
petrolpark.mc.library.core.data.reward.team.OneTimeTeamReward.Team
- All Implemented Interfaces:
net.minecraft.world.level.storage.loot.LootContextUser,IAbstractReward<ITeamReward.Type>,ITeamReward,OneTimeTeamReward
- Enclosing interface:
OneTimeTeamReward
public static record OneTimeTeamReward.Team(net.minecraft.resources.ResourceLocation id, net.minecraft.core.Holder<ITeamReward> oneTimeRewardHolder)
extends Record
implements OneTimeTeamReward
-
Nested Class Summary
Nested classes/interfaces inherited from interface petrolpark.mc.library.core.data.reward.team.ITeamReward
ITeamReward.TypeNested classes/interfaces inherited from interface petrolpark.mc.library.core.data.reward.team.OneTimeTeamReward
OneTimeTeamReward.Info, OneTimeTeamReward.Player, OneTimeTeamReward.Team -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<OneTimeTeamReward.Team> Fields inherited from interface petrolpark.mc.library.core.data.reward.team.ITeamReward
DIRECT_CODEC, TYPED_CODECFields inherited from interface petrolpark.mc.library.core.data.reward.team.OneTimeTeamReward
IDS_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionTeam(net.minecraft.resources.ResourceLocation id, net.minecraft.core.Holder<ITeamReward> oneTimeRewardHolder) Creates an instance of aTeamrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.getType()final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationid()Returns the value of theidrecord component.net.minecraft.core.Holder<ITeamReward> Returns the value of theoneTimeRewardHolderrecord component.booleanrewardInner(ITeam team, net.minecraft.world.level.storage.loot.LootContext context, float multiplier, boolean simulate) final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.storage.loot.LootContextUser
getReferencedContextParamsMethods inherited from interface petrolpark.mc.library.core.data.reward.team.OneTimeTeamReward
info, reward, validate
-
Field Details
-
CODEC
-
-
Constructor Details
-
Team
public Team(net.minecraft.resources.ResourceLocation id, net.minecraft.core.Holder<ITeamReward> oneTimeRewardHolder) Creates an instance of aTeamrecord class.- Parameters:
id- the value for theidrecord componentoneTimeRewardHolder- the value for theoneTimeRewardHolderrecord component
-
-
Method Details
-
rewardInner
public boolean rewardInner(ITeam team, net.minecraft.world.level.storage.loot.LootContext context, float multiplier, boolean simulate) - Specified by:
rewardInnerin interfaceOneTimeTeamReward
-
getType
- Specified by:
getTypein interfaceIAbstractReward<ITeamReward.Type>
-
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). -
id
public net.minecraft.resources.ResourceLocation id()Returns the value of theidrecord component.- Specified by:
idin interfaceOneTimeTeamReward- Returns:
- the value of the
idrecord component
-
oneTimeRewardHolder
Returns the value of theoneTimeRewardHolderrecord component.- Specified by:
oneTimeRewardHolderin interfaceOneTimeTeamReward- Returns:
- the value of the
oneTimeRewardHolderrecord component
-