Class HandledScreenContext

java.lang.Object
com.render.api.HandledScreenContext
Direct Known Subclasses:
MenuHostContext

public class HandledScreenContext extends Object
Snapshot of a handled screen host.
  • Constructor Details

    • HandledScreenContext

      public HandledScreenContext(net.minecraft.client.Minecraft client, net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<?> screen, net.minecraft.world.inventory.AbstractContainerMenu handler, net.minecraft.world.inventory.MenuType<?> handlerType, int syncId, int revision, net.minecraft.network.chat.Component title, String plainTitle, ScreenBounds hostBounds, ScreenBounds handledBounds, net.minecraft.world.inventory.Slot focusedSlot, net.minecraft.world.item.ItemStack cursorStack, List<net.minecraft.world.inventory.Slot> slots)
  • Method Details

    • client

      public net.minecraft.client.Minecraft client()
    • screen

      public net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<?> screen()
    • handler

      public net.minecraft.world.inventory.AbstractContainerMenu handler()
    • handlerType

      public net.minecraft.world.inventory.MenuType<?> handlerType()
    • syncId

      public int syncId()
    • revision

      public int revision()
    • title

      public net.minecraft.network.chat.Component title()
    • plainTitle

      public String plainTitle()
    • hostBounds

      public ScreenBounds hostBounds()
    • handledBounds

      public ScreenBounds handledBounds()
    • x

      public int x()
    • y

      public int y()
    • backgroundWidth

      public int backgroundWidth()
    • backgroundHeight

      public int backgroundHeight()
    • focusedSlot

      public net.minecraft.world.inventory.Slot focusedSlot()
    • cursorStack

      public net.minecraft.world.item.ItemStack cursorStack()
    • slots

      public List<net.minecraft.world.inventory.Slot> slots()
    • slot

      public net.minecraft.world.inventory.Slot slot(int slotId)
    • slotBounds

      public ScreenBounds slotBounds(int slotId)
    • stack

      public net.minecraft.world.item.ItemStack stack(int slotId)
    • stackCount

      public int stackCount(int slotId)
    • hasItem

      public boolean hasItem(int slotId)
    • findSlots

      public List<net.minecraft.world.inventory.Slot> findSlots(Predicate<net.minecraft.world.item.ItemStack> predicate)
    • findFirstSlot

      public net.minecraft.world.inventory.Slot findFirstSlot(Predicate<net.minecraft.world.item.ItemStack> predicate)
    • visibleChestSlots

      public List<net.minecraft.world.inventory.Slot> visibleChestSlots()
    • playerInventorySlots

      public List<net.minecraft.world.inventory.Slot> playerInventorySlots()
    • playerInventory

      protected net.minecraft.world.entity.player.Inventory playerInventory()