Klasse UContainerMenu

java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
Bekannte direkte Unterklassen:
UBlockEntityContainerMenu

public abstract class UContainerMenu extends FluidContainerMenu
  • Verschachtelte Klassen - Übersicht

    Von Klasse geerbte verschachtelte Klassen/Schnittstellen info.u_team.u_team_core.menu.FluidContainerMenu

    FluidContainerMenu.FluidContainerDelegator
  • Feldübersicht

    Von Klasse geerbte Felder net.minecraft.world.inventory.AbstractContainerMenu

    CARRIED_SLOT_SIZE, containerId, lastSlots, QUICKCRAFT_HEADER_CONTINUE, QUICKCRAFT_HEADER_END, QUICKCRAFT_HEADER_START, QUICKCRAFT_TYPE_CHARITABLE, QUICKCRAFT_TYPE_CLONE, QUICKCRAFT_TYPE_GREEDY, SLOT_CLICKED_OUTSIDE, slots
  • Konstruktorübersicht

    Konstruktoren
    Modifizierer
    Konstruktor
    Beschreibung
    protected
    UContainerMenu(net.minecraft.world.inventory.MenuType<?> menuType, int containerId)
    Creates a new container.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    protected <E extends DataHolder>
    E
    Adds a new DataHolder that will automatically synchronize values from the server to the client.
    protected <E extends DataHolder>
    E
    Adds a new DataHolder that will synchronize values from the client to the server.
    void
    Broadcast changed data
    void
    Broadcast data from the client to the server if changed.
    void
    Sends all menu data to the client.
    final void
    setDataHolder(NetworkEnvironment environment, int index, net.minecraft.network.FriendlyByteBuf dataHolderBuffer)
    Called by the packet handler to update the values on the right side.
    boolean
    stillValid(net.minecraft.world.entity.player.Player player)
    Default player interaction with this container to true

    Von Klasse geerbte Methoden info.u_team.u_team_core.menu.FluidContainerMenu

    broadcastFullState, getDelegator

    Von Klasse geerbte Methoden net.minecraft.world.inventory.AbstractContainerMenu

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

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Konstruktordetails

    • UContainerMenu

      protected UContainerMenu(net.minecraft.world.inventory.MenuType<?> menuType, int containerId)
      Creates a new container. Must be implemented by a sub class to be used.
      Parameter:
      menuType - Menu type
      containerId - Container id
  • Methodendetails

    • stillValid

      public boolean stillValid(net.minecraft.world.entity.player.Player player)
      Default player interaction with this container to true
      Angegeben von:
      stillValid in Klasse net.minecraft.world.inventory.AbstractContainerMenu
    • addDataHolderToClient

      protected <E extends DataHolder> E addDataHolderToClient(E holder)
      Adds a new DataHolder that will automatically synchronize values from the server to the client.
      Parameter:
      holder - Data holder
      Gibt zurück:
      The supplied data holder
    • addDataHolderToServer

      protected <E extends DataHolder> E addDataHolderToServer(E holder)
      Adds a new DataHolder that will synchronize values from the client to the server.

      To synchronize values automatically the screen must implement UContainerMenuScreen. If not you must manually call broadcastChangesToServer() every time you update values on the client that should be synchronized to the server.
      Parameter:
      holder - Data holder
      Gibt zurück:
      The supplied data holder
    • sendAllDataToRemote

      public void sendAllDataToRemote()
      Sends all menu data to the client.
      Setzt außer Kraft:
      sendAllDataToRemote in Klasse FluidContainerMenu
    • broadcastChanges

      public void broadcastChanges()
      Broadcast changed data
      Setzt außer Kraft:
      broadcastChanges in Klasse FluidContainerMenu
    • broadcastChangesToServer

      public void broadcastChangesToServer()
      Broadcast data from the client to the server if changed. Needs to be called everytime you want to send changed data from the client to the server. Will be called automatically every tick if the screens base class is UContainerMenuScreen.
      Siehe auch:
    • setDataHolder

      public final void setDataHolder(NetworkEnvironment environment, int index, net.minecraft.network.FriendlyByteBuf dataHolderBuffer)
      Called by the packet handler to update the values on the right side.
      Parameter:
      environment - Side that should set the values
      index - Index of the data holder in the list
      dataHolderBuffer - The buffer that should be set