GuiSlotRealmsProxy .java

net.minecraft.client.gui.GuiSlotRealmsProxy (class): members: selectionList, getMouseX, getMouseY, getContentHeight, elementClicked, drawSlot, getWidth.

net.minecraft.client.guiclass80 linesclientextends GuiSlot2.0 KB

API Surface (11)

int getSize()
void elementClicked(int slotIndex, boolean isDoubleClick, int mouseX, int mouseY)
boolean isSelected(int slotIndex)
void drawBackground()
void drawSlot(int entryID, int p_180791_2_, int p_180791_3_, int p_180791_4_, int mouseXIn, int mouseYIn)
int getWidth()
int getMouseY()
int getMouseX()
int getContentHeight()
int getScrollBarX()
void handleMouseInput()

Fields & Constants (1)

selectionList

Code Graph: Dependencies (3)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

GuiSlotRealmsProxy.java80 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.client.gui;
2
3
import net.minecraft.client.Minecraft;
4
import net.minecraft.realms.RealmsScrolledSelectionList;
5
6
public class GuiSlotRealmsProxy extends GuiSlot
7
{
8
    private final RealmsScrolledSelectionList selectionList;
9
10
    public GuiSlotRealmsProxy(RealmsScrolledSelectionList selectionListIn, int widthIn, int heightIn, int topIn, int bottomIn, int slotHeightIn)
11
    {
12
        super(Minecraft.getMinecraft(), widthIn, heightIn, topIn, bottomIn, slotHeightIn);
13
        this.selectionList = selectionListIn;
14
    }
15
16
    protected int getSize()
17
    {
18
        return this.selectionList.getItemCount();
19
    }
20
21
    /**
22
     * The element in the slot that was clicked, boolean for whether it was double clicked or not
23
     */
24
    protected void elementClicked(int slotIndex, boolean isDoubleClick, int mouseX, int mouseY)
25
    {
26
        this.selectionList.selectItem(slotIndex, isDoubleClick, mouseX, mouseY);
27
    }
28
29
    /**
30
     * Returns true if the element passed in is currently selected
31
     */
32
    protected boolean isSelected(int slotIndex)
33
    {
34
        return this.selectionList.isSelectedItem(slotIndex);
35
    }
36
37
    protected void drawBackground()
38
    {
39
        this.selectionList.renderBackground();
40
    }
41
42
    protected void drawSlot(int entryID, int p_180791_2_, int p_180791_3_, int p_180791_4_, int mouseXIn, int mouseYIn)
43
    {
44
        this.selectionList.renderItem(entryID, p_180791_2_, p_180791_3_, p_180791_4_, mouseXIn, mouseYIn);
45
    }
46
47
    public int getWidth()
48
    {
49
        return super.width;
50
    }
51
52
    public int getMouseY()
53
    {
54
        return super.mouseY;
55
    }
56
57
    public int getMouseX()
58
    {
59
        return super.mouseX;
60
    }
61
62
    /**
63
     * Return the height of the content being scrolled
64
     */
65
    protected int getContentHeight()
66
    {
67
        return this.selectionList.getMaxPosition();
68
    }
69
70
    protected int getScrollBarX()
71
    {
72
        return this.selectionList.getScrollbarPosition();
73
    }
74
75
    public void handleMouseInput()
76
    {
77
        super.handleMouseInput();
78
    }
79
}
80

Deobfuscated MCP 1.8.9 source of GuiSlotRealmsProxy from Marcelektro/MavenMCP-1.8.9 (net/minecraft/client/gui/GuiSlotRealmsProxy.java), stored verbatim.