RealmsScreen .java

net.minecraft.realms.RealmsScreen (class): members: getLevelStorageSource, getLocalizedString, SKIN_HEAD_HEIGHT, SKIN_HAT_HEIGHT, SKIN_HEAD_WIDTH, bind.

net.minecraft.realmsclass256 linescommon8.5 KB

API Surface (45)

GuiScreenRealmsProxy getProxy()
void init()
void init(Minecraft p_init_1_, int p_init_2_, int p_init_3_)
void drawCenteredString(String p_drawCenteredString_1_, int p_drawCenteredString_2_, int p_drawCenteredString_3_, int p_drawCenteredString_4_)
void drawString(String p_drawString_1_, int p_drawString_2_, int p_drawString_3_, int p_drawString_4_)
void drawString(String p_drawString_1_, int p_drawString_2_, int p_drawString_3_, int p_drawString_4_, boolean p_drawString_5_)
void blit(int p_blit_1_, int p_blit_2_, int p_blit_3_, int p_blit_4_, int p_blit_5_, int p_blit_6_)
void blit(int p_blit_0_, int p_blit_1_, float p_blit_2_, float p_blit_3_, int p_blit_4_, int p_blit_5_, int p_blit_6_, int p_blit_7_, float p_blit_8_, float p_blit_9_)
void blit(int p_blit_0_, int p_blit_1_, float p_blit_2_, float p_blit_3_, int p_blit_4_, int p_blit_5_, float p_blit_6_, float p_blit_7_)
void fillGradient(int p_fillGradient_1_, int p_fillGradient_2_, int p_fillGradient_3_, int p_fillGradient_4_, int p_fillGradient_5_, int p_fillGradient_6_)
void renderBackground()
boolean isPauseScreen()
void renderBackground(int p_renderBackground_1_)
void render(int p_render_1_, int p_render_2_, float p_render_3_)
void renderTooltip(ItemStack p_renderTooltip_1_, int p_renderTooltip_2_, int p_renderTooltip_3_)
void renderTooltip(String p_renderTooltip_1_, int p_renderTooltip_2_, int p_renderTooltip_3_)
void renderTooltip(List<String> p_renderTooltip_1_, int p_renderTooltip_2_, int p_renderTooltip_3_)
void bindFace(String p_bindFace_0_, String p_bindFace_1_)
void bind(String p_bind_0_)
void tick()
int width()
int height()
int fontLineHeight()
int fontWidth(String p_fontWidth_1_)
void fontDrawShadow(String p_fontDrawShadow_1_, int p_fontDrawShadow_2_, int p_fontDrawShadow_3_, int p_fontDrawShadow_4_)
List<String> fontSplit(String p_fontSplit_1_, int p_fontSplit_2_)
void buttonClicked(RealmsButton p_buttonClicked_1_)
RealmsButton newButton(int p_newButton_0_, int p_newButton_1_, int p_newButton_2_, String p_newButton_3_)
RealmsButton newButton(int p_newButton_0_, int p_newButton_1_, int p_newButton_2_, int p_newButton_3_, int p_newButton_4_, String p_newButton_5_)
void buttonsClear()
void buttonsAdd(RealmsButton p_buttonsAdd_1_)
List<RealmsButton> buttons()
void buttonsRemove(RealmsButton p_buttonsRemove_1_)
RealmsEditBox newEditBox(int p_newEditBox_1_, int p_newEditBox_2_, int p_newEditBox_3_, int p_newEditBox_4_, int p_newEditBox_5_)
void mouseClicked(int p_mouseClicked_1_, int p_mouseClicked_2_, int p_mouseClicked_3_)
void mouseEvent()
void keyboardEvent()
void mouseReleased(int p_mouseReleased_1_, int p_mouseReleased_2_, int p_mouseReleased_3_)
void mouseDragged(int p_mouseDragged_1_, int p_mouseDragged_2_, int p_mouseDragged_3_, long p_mouseDragged_4_)
void keyPressed(char p_keyPressed_1_, int p_keyPressed_2_)
void confirmResult(boolean p_confirmResult_1_, int p_confirmResult_2_)
String getLocalizedString(String p_getLocalizedString_0_)
String getLocalizedString(String p_getLocalizedString_0_, Object... p_getLocalizedString_1_)
RealmsAnvilLevelStorageSource getLevelStorageSource()
void removed()

Fields & Constants (14)

SKIN_HEAD_U
SKIN_HEAD_V
SKIN_HEAD_WIDTH
SKIN_HEAD_HEIGHT
SKIN_HAT_U
SKIN_HAT_V
SKIN_HAT_WIDTH
SKIN_HAT_HEIGHT
SKIN_TEX_WIDTH
SKIN_TEX_HEIGHT
minecraft
width
height
proxy

Full Source

RealmsScreen.java256 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.realms;
2
3
import com.mojang.util.UUIDTypeAdapter;
4
import java.util.List;
5
import net.minecraft.client.Minecraft;
6
import net.minecraft.client.entity.AbstractClientPlayer;
7
import net.minecraft.client.gui.Gui;
8
import net.minecraft.client.gui.GuiScreenRealmsProxy;
9
import net.minecraft.client.resources.DefaultPlayerSkin;
10
import net.minecraft.client.resources.I18n;
11
import net.minecraft.item.ItemStack;
12
import net.minecraft.util.ResourceLocation;
13
14
public class RealmsScreen
15
{
16
    public static final int SKIN_HEAD_U = 8;
17
    public static final int SKIN_HEAD_V = 8;
18
    public static final int SKIN_HEAD_WIDTH = 8;
19
    public static final int SKIN_HEAD_HEIGHT = 8;
20
    public static final int SKIN_HAT_U = 40;
21
    public static final int SKIN_HAT_V = 8;
22
    public static final int SKIN_HAT_WIDTH = 8;
23
    public static final int SKIN_HAT_HEIGHT = 8;
24
    public static final int SKIN_TEX_WIDTH = 64;
25
    public static final int SKIN_TEX_HEIGHT = 64;
26
    protected Minecraft minecraft;
27
    public int width;
28
    public int height;
29
    private GuiScreenRealmsProxy proxy = new GuiScreenRealmsProxy(this);
30
31
    public GuiScreenRealmsProxy getProxy()
32
    {
33
        return this.proxy;
34
    }
35
36
    public void init()
37
    {
38
    }
39
40
    public void init(Minecraft p_init_1_, int p_init_2_, int p_init_3_)
41
    {
42
    }
43
44
    public void drawCenteredString(String p_drawCenteredString_1_, int p_drawCenteredString_2_, int p_drawCenteredString_3_, int p_drawCenteredString_4_)
45
    {
46
        this.proxy.func_154325_a(p_drawCenteredString_1_, p_drawCenteredString_2_, p_drawCenteredString_3_, p_drawCenteredString_4_);
47
    }
48
49
    public void drawString(String p_drawString_1_, int p_drawString_2_, int p_drawString_3_, int p_drawString_4_)
50
    {
51
        this.drawString(p_drawString_1_, p_drawString_2_, p_drawString_3_, p_drawString_4_, true);
52
    }
53
54
    public void drawString(String p_drawString_1_, int p_drawString_2_, int p_drawString_3_, int p_drawString_4_, boolean p_drawString_5_)
55
    {
56
        this.proxy.func_154322_b(p_drawString_1_, p_drawString_2_, p_drawString_3_, p_drawString_4_, false);
57
    }
58
59
    public void blit(int p_blit_1_, int p_blit_2_, int p_blit_3_, int p_blit_4_, int p_blit_5_, int p_blit_6_)
60
    {
61
        this.proxy.drawTexturedModalRect(p_blit_1_, p_blit_2_, p_blit_3_, p_blit_4_, p_blit_5_, p_blit_6_);
62
    }
63
64
    public static void blit(int p_blit_0_, int p_blit_1_, float p_blit_2_, float p_blit_3_, int p_blit_4_, int p_blit_5_, int p_blit_6_, int p_blit_7_, float p_blit_8_, float p_blit_9_)
65
    {
66
        Gui.drawScaledCustomSizeModalRect(p_blit_0_, p_blit_1_, p_blit_2_, p_blit_3_, p_blit_4_, p_blit_5_, p_blit_6_, p_blit_7_, p_blit_8_, p_blit_9_);
67
    }
68
69
    public static void blit(int p_blit_0_, int p_blit_1_, float p_blit_2_, float p_blit_3_, int p_blit_4_, int p_blit_5_, float p_blit_6_, float p_blit_7_)
70
    {
71
        Gui.drawModalRectWithCustomSizedTexture(p_blit_0_, p_blit_1_, p_blit_2_, p_blit_3_, p_blit_4_, p_blit_5_, p_blit_6_, p_blit_7_);
72
    }
73
74
    public void fillGradient(int p_fillGradient_1_, int p_fillGradient_2_, int p_fillGradient_3_, int p_fillGradient_4_, int p_fillGradient_5_, int p_fillGradient_6_)
75
    {
76
        this.proxy.drawGradientRect(p_fillGradient_1_, p_fillGradient_2_, p_fillGradient_3_, p_fillGradient_4_, p_fillGradient_5_, p_fillGradient_6_);
77
    }
78
79
    public void renderBackground()
80
    {
81
        this.proxy.drawDefaultBackground();
82
    }
83
84
    public boolean isPauseScreen()
85
    {
86
        return this.proxy.doesGuiPauseGame();
87
    }
88
89
    public void renderBackground(int p_renderBackground_1_)
90
    {
91
        this.proxy.drawWorldBackground(p_renderBackground_1_);
92
    }
93
94
    public void render(int p_render_1_, int p_render_2_, float p_render_3_)
95
    {
96
        for (int i = 0; i < this.proxy.func_154320_j().size(); ++i)
97
        {
98
            ((RealmsButton)this.proxy.func_154320_j().get(i)).render(p_render_1_, p_render_2_);
99
        }
100
    }
101
102
    public void renderTooltip(ItemStack p_renderTooltip_1_, int p_renderTooltip_2_, int p_renderTooltip_3_)
103
    {
104
        this.proxy.renderToolTip(p_renderTooltip_1_, p_renderTooltip_2_, p_renderTooltip_3_);
105
    }
106
107
    public void renderTooltip(String p_renderTooltip_1_, int p_renderTooltip_2_, int p_renderTooltip_3_)
108
    {
109
        this.proxy.drawCreativeTabHoveringText(p_renderTooltip_1_, p_renderTooltip_2_, p_renderTooltip_3_);
110
    }
111
112
    public void renderTooltip(List<String> p_renderTooltip_1_, int p_renderTooltip_2_, int p_renderTooltip_3_)
113
    {
114
        this.proxy.drawHoveringText(p_renderTooltip_1_, p_renderTooltip_2_, p_renderTooltip_3_);
115
    }
116
117
    public static void bindFace(String p_bindFace_0_, String p_bindFace_1_)
118
    {
119
        ResourceLocation resourcelocation = AbstractClientPlayer.getLocationSkin(p_bindFace_1_);
120
121
        if (resourcelocation == null)
122
        {
123
            resourcelocation = DefaultPlayerSkin.getDefaultSkin(UUIDTypeAdapter.fromString(p_bindFace_0_));
124
        }
125
126
        AbstractClientPlayer.getDownloadImageSkin(resourcelocation, p_bindFace_1_);
127
        Minecraft.getMinecraft().getTextureManager().bindTexture(resourcelocation);
128
    }
129
130
    public static void bind(String p_bind_0_)
131
    {
132
        ResourceLocation resourcelocation = new ResourceLocation(p_bind_0_);
133
        Minecraft.getMinecraft().getTextureManager().bindTexture(resourcelocation);
134
    }
135
136
    public void tick()
137
    {
138
    }
139
140
    public int width()
141
    {
142
        return this.proxy.width;
143
    }
144
145
    public int height()
146
    {
147
        return this.proxy.height;
148
    }
149
150
    public int fontLineHeight()
151
    {
152
        return this.proxy.func_154329_h();
153
    }
154
155
    public int fontWidth(String p_fontWidth_1_)
156
    {
157
        return this.proxy.func_154326_c(p_fontWidth_1_);
158
    }
159
160
    public void fontDrawShadow(String p_fontDrawShadow_1_, int p_fontDrawShadow_2_, int p_fontDrawShadow_3_, int p_fontDrawShadow_4_)
161
    {
162
        this.proxy.func_154319_c(p_fontDrawShadow_1_, p_fontDrawShadow_2_, p_fontDrawShadow_3_, p_fontDrawShadow_4_);
163
    }
164
165
    public List<String> fontSplit(String p_fontSplit_1_, int p_fontSplit_2_)
166
    {
167
        return this.proxy.func_154323_a(p_fontSplit_1_, p_fontSplit_2_);
168
    }
169
170
    public void buttonClicked(RealmsButton p_buttonClicked_1_)
171
    {
172
    }
173
174
    public static RealmsButton newButton(int p_newButton_0_, int p_newButton_1_, int p_newButton_2_, String p_newButton_3_)
175
    {
176
        return new RealmsButton(p_newButton_0_, p_newButton_1_, p_newButton_2_, p_newButton_3_);
177
    }
178
179
    public static RealmsButton newButton(int p_newButton_0_, int p_newButton_1_, int p_newButton_2_, int p_newButton_3_, int p_newButton_4_, String p_newButton_5_)
180
    {
181
        return new RealmsButton(p_newButton_0_, p_newButton_1_, p_newButton_2_, p_newButton_3_, p_newButton_4_, p_newButton_5_);
182
    }
183
184
    public void buttonsClear()
185
    {
186
        this.proxy.func_154324_i();
187
    }
188
189
    public void buttonsAdd(RealmsButton p_buttonsAdd_1_)
190
    {
191
        this.proxy.func_154327_a(p_buttonsAdd_1_);
192
    }
193
194
    public List<RealmsButton> buttons()
195
    {
196
        return this.proxy.func_154320_j();
197
    }
198
199
    public void buttonsRemove(RealmsButton p_buttonsRemove_1_)
200
    {
201
        this.proxy.func_154328_b(p_buttonsRemove_1_);
202
    }
203
204
    public RealmsEditBox newEditBox(int p_newEditBox_1_, int p_newEditBox_2_, int p_newEditBox_3_, int p_newEditBox_4_, int p_newEditBox_5_)
205
    {
206
        return new RealmsEditBox(p_newEditBox_1_, p_newEditBox_2_, p_newEditBox_3_, p_newEditBox_4_, p_newEditBox_5_);
207
    }
208
209
    public void mouseClicked(int p_mouseClicked_1_, int p_mouseClicked_2_, int p_mouseClicked_3_)
210
    {
211
    }
212
213
    public void mouseEvent()
214
    {
215
    }
216
217
    public void keyboardEvent()
218
    {
219
    }
220
221
    public void mouseReleased(int p_mouseReleased_1_, int p_mouseReleased_2_, int p_mouseReleased_3_)
222
    {
223
    }
224
225
    public void mouseDragged(int p_mouseDragged_1_, int p_mouseDragged_2_, int p_mouseDragged_3_, long p_mouseDragged_4_)
226
    {
227
    }
228
229
    public void keyPressed(char p_keyPressed_1_, int p_keyPressed_2_)
230
    {
231
    }
232
233
    public void confirmResult(boolean p_confirmResult_1_, int p_confirmResult_2_)
234
    {
235
    }
236
237
    public static String getLocalizedString(String p_getLocalizedString_0_)
238
    {
239
        return I18n.format(p_getLocalizedString_0_, new Object[0]);
240
    }
241
242
    public static String getLocalizedString(String p_getLocalizedString_0_, Object... p_getLocalizedString_1_)
243
    {
244
        return I18n.format(p_getLocalizedString_0_, p_getLocalizedString_1_);
245
    }
246
247
    public RealmsAnvilLevelStorageSource getLevelStorageSource()
248
    {
249
        return new RealmsAnvilLevelStorageSource(Minecraft.getMinecraft().getSaveLoader());
250
    }
251
252
    public void removed()
253
    {
254
    }
255
}
256

Deobfuscated MCP 1.8.9 source of RealmsScreen from Marcelektro/MavenMCP-1.8.9 (net/minecraft/realms/RealmsScreen.java), stored verbatim.