|
15 | 15 |
|
16 | 16 | import org.lwjgl.glfw.GLFW; |
17 | 17 | import net.minecraft.client.Minecraft; |
18 | | -import net.minecraft.client.gui.GuiGraphicsExtractor; |
| 18 | +import net.minecraft.client.gui.GuiGraphics; |
19 | 19 | import net.minecraft.client.gui.components.Button; |
20 | 20 | import net.minecraft.client.gui.components.EditBox; |
21 | | -import net.minecraft.client.gui.components.Renderable; |
22 | 21 | import net.minecraft.client.gui.screens.ConfirmScreen; |
23 | 22 | import net.minecraft.client.gui.screens.Screen; |
24 | 23 | import net.minecraft.client.input.KeyEvent; |
@@ -119,18 +118,15 @@ public void init() |
119 | 118 | } |
120 | 119 |
|
121 | 120 | @Override |
122 | | - public void extractRenderState(GuiGraphicsExtractor context, int mouseX, |
123 | | - int mouseY, float partialTicks) |
| 121 | + public void render(GuiGraphics context, int mouseX, int mouseY, |
| 122 | + float partialTicks) |
124 | 123 | { |
125 | | - listGui.extractRenderState(context, mouseX, mouseY, partialTicks); |
| 124 | + super.render(context, mouseX, mouseY, partialTicks); |
126 | 125 |
|
127 | | - context.centeredText( |
| 126 | + context.drawCenteredString( |
128 | 127 | minecraft.font, friendList.getName() + " (" |
129 | 128 | + friendList.getFriendNames().size() + ")", |
130 | 129 | width / 2, 12, CommonColors.WHITE); |
131 | | - |
132 | | - for(Renderable drawable : renderables) |
133 | | - drawable.extractRenderState(context, mouseX, mouseY, partialTicks); |
134 | 130 | } |
135 | 131 |
|
136 | 132 | @Override |
@@ -207,15 +203,15 @@ public Component getNarration() |
207 | 203 | } |
208 | 204 |
|
209 | 205 | @Override |
210 | | - public void extractContent(GuiGraphicsExtractor context, int mouseX, |
211 | | - int mouseY, boolean hovered, float tickDelta) |
| 206 | + public void renderContent(GuiGraphics context, int mouseX, int mouseY, |
| 207 | + boolean hovered, float tickDelta) |
212 | 208 | { |
213 | 209 | int x = getContentX(); |
214 | 210 | int y = getContentY(); |
215 | 211 |
|
216 | | - context.text(minecraft.font, friendName, x + 4, y + 4, |
| 212 | + context.drawString(minecraft.font, friendName, x + 4, y + 4, |
217 | 213 | CommonColors.WHITE, false); |
218 | | - context.text(minecraft.font, "Click or shift-click to select", |
| 214 | + context.drawString(minecraft.font, "Click or shift-click to select", |
219 | 215 | x + 4, y + 16, CommonColors.LIGHT_GRAY, false); |
220 | 216 | } |
221 | 217 |
|
|
0 commit comments