Contents
Class TradeSlot
java.lang.Object
com.hypixel.hytale.builtin.adventure.shop.barter.TradeSlot
- Direct Known Subclasses:
FixedTradeSlot, PoolTradeSlot
Base class for trade slot definitions.
Trade slots define how trades are selected for display in a shop.
Types: - Fixed: Always shows a specific trade - Pool: Randomly selects trades from a weighted pool
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CodecMapCodec<TradeSlot> Polymorphic codec using "Type" field as discriminator.static final TradeSlot[] -
Method Summary
Modifier and TypeMethodDescriptionabstract intGet the number of trade slots this definition will produce.abstract List<BarterTrade> Resolve this slot into concrete trades.
-
Field Details
-
CODEC
Polymorphic codec using "Type" field as discriminator. -
EMPTY_ARRAY
-
-
Method Details
-
resolve
Resolve this slot into concrete trades.- Parameters:
random- Random source for weighted selection- Returns:
- List of resolved BarterTrade instances
-
getSlotCount
public abstract int getSlotCount()Get the number of trade slots this definition will produce.- Returns:
- Number of trades this slot will resolve to
-