Contents
Class PoolTradeSlot
java.lang.Object
com.hypixel.hytale.builtin.adventure.shop.barter.TradeSlot
com.hypixel.hytale.builtin.adventure.shop.barter.PoolTradeSlot
A trade slot that randomly selects trades from a weighted pool.
Selects
slotCount unique trades (without replacement).
JSON format:
{
"Type": "Pool",
"SlotCount": 2,
"Trades": [
{ "Weight": 50, "Output": {...}, "Input": [...], "Stock": [8, 12] },
{ "Weight": 30, "Output": {...}, "Input": [...], "Stock": [5] }
]
}
Stock can be a single value [10] or a range [min, max].-
Field Summary
FieldsFields inherited from class TradeSlot
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintGet the number of trade slots this definition will produce.Resolve this slot into concrete trades.toString()
-
Field Details
-
CODEC
-
-
Constructor Details
-
PoolTradeSlot
-
-
Method Details
-
getPoolSlotCount
public int getPoolSlotCount() -
getTrades
-
resolve
-
getSlotCount
public int getSlotCount()Description copied from class:TradeSlotGet the number of trade slots this definition will produce.- Specified by:
getSlotCountin classTradeSlot- Returns:
- Number of trades this slot will resolve to
-
toString
-