public abstract class AmadronRecipe extends PneumaticCraftRecipe
PneumaticCraftRecipe.DummyIInventory| Modifier | Constructor and Description |
|---|---|
protected |
AmadronRecipe(net.minecraft.util.ResourceLocation id)
Construct a new offer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAvailabilityData(net.minecraft.entity.player.PlayerEntity player,
java.util.List<net.minecraft.util.text.ITextComponent> curTip)
Add some information about where this offer is available, in the case of offers with limited availablity.
|
abstract AmadronTradeResource |
getInput()
Get the offer's input, i.e.
|
abstract int |
getMaxStock()
Get the maximum (initial) stock level for this offer.
|
abstract AmadronTradeResource |
getOutput()
Get the offer's output, i.e.
|
abstract int |
getStock()
Get the number of trades Amadron currently has in stock for this offer.
|
abstract int |
getTradeLevel()
The rarity for villager and periodic trades, in the range of 1 (common) to 5 (very rare)
|
java.lang.String |
getVendor()
Deprecated.
don't use this; use
getVendorName() |
net.minecraft.util.text.ITextComponent |
getVendorName()
Get the offer's vendor name, for display purposes.
|
boolean |
isLocationLimited() |
boolean |
isRemovableBy(net.minecraft.entity.player.PlayerEntity player)
Can this offer be removed by the given player?
|
abstract boolean |
isStaticOffer()
Is this a static offer, always displayed on the Amadron tablet? Or periodic, shuffled in at random once per
Minecraft day (by default) ?
|
abstract boolean |
isUsableByPlayer(net.minecraft.entity.player.PlayerEntity player)
Is this offer available to the given player? By default, all offers are available, but offers can be
whitelisted/blacklisted in data packs with the "whitelist" and "blacklist" fields in the Amadron recipe JSON.
|
boolean |
passesQuery(java.lang.String query)
Does this offer match the given query string? The input resource, output resource and vendor names are all
tested (case-insensitive) for the query.
|
abstract void |
setStock(int stock)
Update the number of trades Amadron currently has in stock for this offer.
|
assemble, canCraftInDimensions, getId, getResultItem, isSpecial, matches, writeprotected AmadronRecipe(net.minecraft.util.ResourceLocation id)
id - the unique recipe ID@Nonnull public abstract AmadronTradeResource getInput()
@Nonnull public abstract AmadronTradeResource getOutput()
public net.minecraft.util.text.ITextComponent getVendorName()
@Deprecated public java.lang.String getVendor()
getVendorName()public abstract boolean isStaticOffer()
public abstract int getTradeLevel()
public abstract int getStock()
public abstract void setStock(int stock)
getMaxStock() (provided that the max stock level is > 0).stock - the new stock levelpublic abstract int getMaxStock()
public boolean isRemovableBy(net.minecraft.entity.player.PlayerEntity player)
player - the playerpublic abstract boolean isUsableByPlayer(net.minecraft.entity.player.PlayerEntity player)
PneumaticRegistry.IPneumaticCraftInterface.registerPlayerMatcher(ResourceLocation, IPlayerMatcher.MatcherFactory)player - the player to checkpublic final boolean passesQuery(java.lang.String query)
query - the query stringpublic void addAvailabilityData(net.minecraft.entity.player.PlayerEntity player,
java.util.List<net.minecraft.util.text.ITextComponent> curTip)
curTip - tooltip to add information topublic boolean isLocationLimited()