Class AmadronMenu

java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
All Implemented Interfaces:
IGUIButtonSensitive

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
    final boolean[]
     
    int
     
    static final int
     
    static final int
     
    int
     
     

    Fields inherited from class me.desht.pneumaticcraft.common.inventory.AbstractPneumaticCraftMenu

    te

    Fields inherited from class net.minecraft.world.inventory.AbstractContainerMenu

    CARRIED_SLOT_SIZE, containerId, QUICKCRAFT_HEADER_CONTINUE, QUICKCRAFT_HEADER_END, QUICKCRAFT_HEADER_START, QUICKCRAFT_TYPE_CHARITABLE, QUICKCRAFT_TYPE_CLONE, QUICKCRAFT_TYPE_GREEDY, SLOT_CLICKED_OUTSIDE, slots
  • Constructor Summary

    Constructors
    Constructor
    Description
    AmadronMenu(int windowId, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.network.FriendlyByteBuf buffer)
     
    AmadronMenu(int windowId, net.minecraft.world.entity.player.Inventory invPlayer, net.minecraft.world.InteractionHand hand)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    clickOffer(net.minecraft.resources.ResourceLocation offerId, int mouseButton, boolean shiftPressed, net.minecraft.server.level.ServerPlayer player)
    Called server-side via PacketAmadronOrderUpdate to handle an offer being clicked.
    net.minecraft.world.InteractionHand
     
    int
    getShoppingBasketUnits(net.minecraft.resources.ResourceLocation offerId)
     
    void
    handleGUIButtonPress(String tag, boolean shiftHeld, net.minecraft.server.level.ServerPlayer player)
     
    boolean
     
    net.minecraft.world.item.ItemStack
    quickMoveStack(net.minecraft.world.entity.player.Player player, int slot)
     
    void
    removed(net.minecraft.world.entity.player.Player player)
     
    retrieveOrder(String playerName, AmadronRecipe offer, int units, net.minecraft.core.GlobalPos itemGPos, net.minecraft.core.GlobalPos liquidGPos)
     
    boolean
    stillValid(net.minecraft.world.entity.player.Player player)
     
    void
    updateBasket(net.minecraft.resources.ResourceLocation offerId, int amount)
     
    static boolean
    validateStockLevel(String playerName, AmadronRecipe offer, int units, boolean isAmadronRestock)
     

    Methods inherited from class me.desht.pneumaticcraft.common.inventory.AbstractPneumaticCraftMenu

    addPlayerSlots, addPlayerSlots, addUpgradeSlots, broadcastChanges, clicked, moveItemStackTo, putHand, updateField

    Methods inherited from class net.minecraft.world.inventory.AbstractContainerMenu

    addDataSlot, addDataSlots, addSlot, addSlotListener, broadcastFullState, canDragTo, canItemQuickReplace, canTakeItemForPickAll, checkContainerDataCount, checkContainerSize, clearContainer, clickMenuButton, findSlot, getCarried, getItems, getQuickcraftHeader, getQuickcraftMask, getQuickCraftSlotCount, getQuickcraftType, getRedstoneSignalFromBlockEntity, getRedstoneSignalFromContainer, getSlot, getStateId, getType, incrementStateId, initializeContents, isValidQuickcraftType, isValidSlotIndex, removeSlotListener, resetQuickCraft, resumeRemoteUpdates, sendAllDataToRemote, setCarried, setData, setItem, setRemoteCarried, setRemoteSlot, setRemoteSlotNoCopy, setSynchronizer, slotsChanged, stillValid, suppressRemoteUpdates, transferState

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • HARD_MAX_STACKS

      public static final int HARD_MAX_STACKS
      See Also:
    • HARD_MAX_MB

      public static final int HARD_MAX_MB
      See Also:
    • activeOffers

      public final List<AmadronRecipe> activeOffers
    • affordableOffers

      public final boolean[] affordableOffers
    • problemState

      public AmadronMenu.EnumProblemState problemState
    • maxPlayerOffers

      public int maxPlayerOffers
    • currentPlayerOffers

      public int currentPlayerOffers
  • Constructor Details

    • AmadronMenu

      public AmadronMenu(int windowId, net.minecraft.world.entity.player.Inventory invPlayer, net.minecraft.world.InteractionHand hand)
    • AmadronMenu

      public AmadronMenu(int windowId, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.network.FriendlyByteBuf buffer)
  • Method Details

    • updateBasket

      public void updateBasket(net.minecraft.resources.ResourceLocation offerId, int amount)
    • isBasketEmpty

      public boolean isBasketEmpty()
    • getHand

      public net.minecraft.world.InteractionHand getHand()
    • stillValid

      public boolean stillValid(net.minecraft.world.entity.player.Player player)
      Overrides:
      stillValid in class AbstractPneumaticCraftMenu<AbstractPneumaticCraftBlockEntity>
    • quickMoveStack

      @Nonnull public net.minecraft.world.item.ItemStack quickMoveStack(net.minecraft.world.entity.player.Player player, int slot)
      Overrides:
      quickMoveStack in class AbstractPneumaticCraftMenu<AbstractPneumaticCraftBlockEntity>
    • clickOffer

      public void clickOffer(net.minecraft.resources.ResourceLocation offerId, int mouseButton, boolean shiftPressed, net.minecraft.server.level.ServerPlayer player)
      Called server-side via PacketAmadronOrderUpdate to handle an offer being clicked.
      Parameters:
      offerId - the offer id
      mouseButton - which mouse button
      shiftPressed - true if shift-clicked
      player - the player
    • handleGUIButtonPress

      public void handleGUIButtonPress(String tag, boolean shiftHeld, net.minecraft.server.level.ServerPlayer player)
      Specified by:
      handleGUIButtonPress in interface IGUIButtonSensitive
      Overrides:
      handleGUIButtonPress in class AbstractPneumaticCraftMenu<AbstractPneumaticCraftBlockEntity>
    • retrieveOrder

      public static AmadroneEntity retrieveOrder(String playerName, AmadronRecipe offer, int units, net.minecraft.core.GlobalPos itemGPos, net.minecraft.core.GlobalPos liquidGPos)
    • validateStockLevel

      public static boolean validateStockLevel(String playerName, AmadronRecipe offer, int units, boolean isAmadronRestock)
    • getShoppingBasketUnits

      public int getShoppingBasketUnits(net.minecraft.resources.ResourceLocation offerId)
    • removed

      public void removed(net.minecraft.world.entity.player.Player player)
      Overrides:
      removed in class net.minecraft.world.inventory.AbstractContainerMenu