Class BarterShopState.ShopInstanceState

java.lang.Object
com.hypixel.hytale.builtin.adventure.shop.barter.BarterShopState.ShopInstanceState
Enclosing class:
BarterShopState

public static class BarterShopState.ShopInstanceState extends Object
  • Field Details

    • currentStock

      private int[] currentStock
    • nextRefreshTime

      private Instant nextRefreshTime
    • resolveSeed

      private Long resolveSeed
    • resolvedTrades

      private transient BarterTrade[] resolvedTrades
  • Constructor Details

    • ShopInstanceState

      public ShopInstanceState()
    • ShopInstanceState

      public ShopInstanceState(int tradeCount)
  • Method Details

    • getCurrentStock

      public int[] getCurrentStock()
    • getNextRefreshTime

      @Nullable public Instant getNextRefreshTime()
    • setNextRefreshTime

      public void setNextRefreshTime(Instant time)
    • getResolveSeed

      @Nullable public Long getResolveSeed()
    • setResolveSeed

      public void setResolveSeed(Long seed)
    • getResolvedTrades

      @Nonnull public BarterTrade[] getResolvedTrades(@Nonnull BarterShopAsset asset)
    • resolveTradeSlots

      @Nonnull private static BarterTrade[] resolveTradeSlots(@Nonnull BarterShopAsset asset, long seed)
    • resetStockAndResolve

      public void resetStockAndResolve(@Nonnull BarterShopAsset asset)
    • resetStock

      public void resetStock(BarterShopAsset asset)
    • expandStockIfNeeded

      public boolean expandStockIfNeeded(BarterShopAsset asset)
    • hasStock

      public boolean hasStock(int tradeIndex, int quantity)
    • decrementStock

      public boolean decrementStock(int tradeIndex, int quantity)
    • getStock

      public int getStock(int tradeIndex)