JavaScript is disabled on your browser.
Nested Class Summary
Nested Classes
Enum Constant Summary
Enum Constants
Method Summary
All Methods Static Methods Instance Methods Concrete Methods
boolean
Try to add a player->player offer.
void
void
void
Called on a resource reload (including startup) and periodically to shuffle new periodic offers in
int
getOffer (net.minecraft.resources.ResourceLocation offerId)
boolean
boolean
isActive (net.minecraft.resources.ResourceLocation offerId)
void
boolean
void
Called when the server is stopping to ensure everything is serialized
void
Called client-side (from PacketSyncAmadronOffers) to sync up the active offer list.
void
Called every 30 seconds: Amadron will send drones to restock custom player offers, and also to pay out
any pending payments for custom offers.
void
updateStock (net.minecraft.resources.ResourceLocation id,
int stock)
Called client-side (from PacketAmadronUpdateStock) to update stock levels of an offer that someone just purchased.
Returns the enum constant of this class with the specified name.
Returns an array containing the constants of this enum class, in
the order they are declared.
Methods inherited from class java.lang.Enum
clone , compareTo , describeConstable , equals , finalize , getDeclaringClass , hashCode , name , ordinal , toString , valueOf
Method Details
values
Returns an array containing the constants of this enum class, in
the order they are declared.
Returns:
an array containing the constants of this enum class, in the order they are declared
valueOf
Returns the enum constant of this class with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this class. (Extraneous whitespace characters are
not permitted.)
Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum class has no constant with the specified name
NullPointerException - if the argument is null
getOffer
public AmadronRecipe getOffer (net.minecraft.resources.ResourceLocation offerId)
addPlayerOffer
Try to add a player->player offer.
Parameters:
offer - the offer to add
Returns:
true if the offer was added, false if an equivalent offer already exists or the offer is invalid
syncOffers
Called client-side (from PacketSyncAmadronOffers) to sync up the active offer list.
Parameters:
newOffers - the new offers
notifyPlayer - true to notify players of new offers
updateStock
public void updateStock (net.minecraft.resources.ResourceLocation id,
int stock)
Called client-side (from PacketAmadronUpdateStock) to update stock levels of an offer that someone just purchased.
Parameters:
id - offer ID, must be in the active offers list
stock - new stock level
countPlayerOffers
public int countPlayerOffers (UUID playerId)
tryRestockPlayerOffers
public void tryRestockPlayerOffers ()
Called every 30 seconds: Amadron will send drones to restock custom player offers, and also to pay out
any pending payments for custom offers.
saveAll
public void saveAll ()
Called when the server is stopping to ensure everything is serialized
compileActiveOffersList
public void compileActiveOffersList ()
Called on a resource reload (including startup) and periodically to shuffle new periodic offers in
addPlayerOffers
public void addPlayerOffers ()
rebuildRequired
public void rebuildRequired ()
checkForFullRebuild
public void checkForFullRebuild (net.minecraft.world.level.Level world)
isActive
public boolean isActive (net.minecraft.resources.ResourceLocation offerId)