Record Class GrantRestaurantXPTeamReward.Info
java.lang.Object
java.lang.Record
petrolpark.mc.library.core.data.reward.team.GrantRestaurantXPTeamReward.Info
- All Implemented Interfaces:
INamedRewardInfo,IRewardInfo
- Enclosing class:
GrantRestaurantXPTeamReward
public static record GrantRestaurantXPTeamReward.Info(net.minecraft.core.Holder<Restaurant> restaurant, NumberEstimate amount)
extends Record
implements INamedRewardInfo
-
Nested Class Summary
Nested classes/interfaces inherited from interface petrolpark.mc.library.core.data.reward.info.INamedRewardInfo
INamedRewardInfo.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<GrantRestaurantXPTeamReward.Info> static final net.minecraft.resources.ResourceLocationstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, GrantRestaurantXPTeamReward.Info> Fields inherited from interface petrolpark.mc.library.core.data.reward.info.IRewardInfo
DIRECT_CODEC, TYPED_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionInfo(net.minecraft.core.Holder<Restaurant> restaurant, NumberEstimate amount) Creates an instance of aInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidamount()Returns the value of theamountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.voidrender(net.minecraft.client.gui.GuiGraphics graphics) net.minecraft.core.Holder<Restaurant> Returns the value of therestaurantrecord component.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 petrolpark.mc.library.core.data.reward.info.INamedRewardInfo
translate, translateSimple
-
Field Details
-
RESTAURANT_EXPERIENCE_ORBS_TEXTURE
public static final net.minecraft.resources.ResourceLocation RESTAURANT_EXPERIENCE_ORBS_TEXTURE -
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,GrantRestaurantXPTeamReward.Info> STREAM_CODEC
-
-
Constructor Details
-
Info
Creates an instance of aInforecord class.- Parameters:
restaurant- the value for therestaurantrecord componentamount- the value for theamountrecord component
-
-
Method Details
-
render
public void render(net.minecraft.client.gui.GuiGraphics graphics) - Specified by:
renderin interfaceIRewardInfo
-
addToDescription
- Specified by:
addToDescriptionin interfaceIRewardInfo
-
getRewardInfoType
- Specified by:
getRewardInfoTypein interfaceINamedRewardInfo- Specified by:
getRewardInfoTypein interfaceIRewardInfo
-
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). -
restaurant
Returns the value of therestaurantrecord component.- Returns:
- the value of the
restaurantrecord component
-
amount
Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-