Record Class RestaurantTeamNumberProvider
java.lang.Object
java.lang.Record
petrolpark.mc.library.core.data.numberProvider.team.RestaurantTeamNumberProvider
- All Implemented Interfaces:
net.minecraft.world.level.storage.loot.LootContextUser,TeamNumberProvider
@ParametersAreNonnullByDefault
public record RestaurantTeamNumberProvider(Optional<net.minecraft.core.Holder<Restaurant>> restaurant, RestaurantTeamNumberProvider.Value value)
extends Record
implements TeamNumberProvider
petrolpark:restaurant
Restaurant as it pertains to the given ITeam.
Arguments:
-
restaurant- The Restaurant to query. If left blank, defaults to theRestaurant provided in the LootContext -
value- Any ofxp,orders_takenororders_fulfilled
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<RestaurantTeamNumberProvider> Fields inherited from interface petrolpark.mc.library.core.data.numberProvider.team.TeamNumberProvider
TYPED_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionRestaurantTeamNumberProvider(Optional<net.minecraft.core.Holder<Restaurant>> restaurant, RestaurantTeamNumberProvider.Value value) Creates an instance of aRestaurantTeamNumberProviderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Get the approximate bounds for theoutputof thisTeamNumberProvideron a best-effort basis.floatintSet<net.minecraft.world.level.storage.loot.parameters.LootContextParam<?>> final inthashCode()Returns a hash code value for this object.Optional<net.minecraft.core.Holder<Restaurant>> Returns the value of therestaurantrecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.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
validateMethods inherited from interface petrolpark.mc.library.core.data.numberProvider.team.TeamNumberProvider
getMaxFloat
-
Field Details
-
CODEC
-
-
Constructor Details
-
RestaurantTeamNumberProvider
public RestaurantTeamNumberProvider(Optional<net.minecraft.core.Holder<Restaurant>> restaurant, RestaurantTeamNumberProvider.Value value) Creates an instance of aRestaurantTeamNumberProviderrecord class.- Parameters:
restaurant- the value for therestaurantrecord componentvalue- the value for thevaluerecord component
-
-
Method Details
-
getFloat
- Specified by:
getFloatin interfaceTeamNumberProvider
-
getInt
- Specified by:
getIntin interfaceTeamNumberProvider
-
getEstimate
Description copied from interface:TeamNumberProviderGet the approximate bounds for theoutputof thisTeamNumberProvideron a best-effort basis.- Specified by:
getEstimatein interfaceTeamNumberProvider- See Also:
-
getTeamNumberProviderType
- Specified by:
getTeamNumberProviderTypein interfaceTeamNumberProvider
-
getReferencedContextParams
public Set<net.minecraft.world.level.storage.loot.parameters.LootContextParam<?>> getReferencedContextParams()- Specified by:
getReferencedContextParamsin interfacenet.minecraft.world.level.storage.loot.LootContextUser
-
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
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-