|
36 | 36 | import net.minecraft.client.resources.language.I18n; |
37 | 37 | import net.minecraft.client.server.IntegratedServer; |
38 | 38 | import net.minecraft.network.chat.Component; |
| 39 | +//# 1.21.11 |
| 40 | +//$$import net.minecraft.resources.Identifier; |
| 41 | +//# def |
39 | 42 | import net.minecraft.resources.ResourceLocation; |
| 43 | +//# end |
40 | 44 | import net.minecraft.server.MinecraftServer; |
41 | 45 | import net.minecraft.server.ServerTickRateManager; |
42 | 46 | import net.minecraft.server.level.ServerLevel; |
|
58 | 62 | public class LoTASLightClient implements ClientModInitializer { |
59 | 63 |
|
60 | 64 | private KeybindManager keybindManager = new KeybindManager(KeybindManager::isKeyDownExceptTextField); |
| 65 | + // # 1.21.11 |
| 66 | +//$$ private static final KeyMapping.Category LOTASLIGHT_CATEGORY = KeyMapping.Category.register(Identifier.fromNamespaceAndPath("lotaslight", "lotaslight")); |
61 | 67 | // # 1.21.10 |
62 | 68 | //$$ private static final KeyMapping.Category LOTASLIGHT_CATEGORY = KeyMapping.Category.register(ResourceLocation.fromNamespaceAndPath("lotaslight", "lotaslight")); |
63 | 69 | //# end |
@@ -203,6 +209,11 @@ private void advanceTickrate(Minecraft client) { |
203 | 209 | } |
204 | 210 |
|
205 | 211 | private void drawHud(GuiGraphics context, float deltaTicks) { //@GraphicsDelta; |
| 212 | + //# 1.21.11 |
| 213 | +//$$ int i = ARGB.colorFromFloat(.2F, 1f, 1f, 1f); |
| 214 | +//$$ context.blit(RenderPipelines.GUI_TEXTURED, Identifier.fromNamespaceAndPath("lotaslight", "potion.png"), Minecraft.getInstance().getWindow().getGuiScaledWidth() / 2 |
| 215 | +//$$ - 10, Minecraft.getInstance().getWindow().getGuiScaledHeight() |
| 216 | +//$$ - 50, 0, 0, 20, 20, 20, 20, i); |
206 | 217 | //# 1.21.8 |
207 | 218 | //$$ int i = ARGB.colorFromFloat(.2F, 1f, 1f, 1f); |
208 | 219 | //$$ context.blit(RenderPipelines.GUI_TEXTURED, ResourceLocation.fromNamespaceAndPath("lotaslight", "potion.png"), Minecraft.getInstance().getWindow().getGuiScaledWidth() / 2 |
@@ -245,7 +256,13 @@ private void advanceTickrate(Minecraft client) { |
245 | 256 | } |
246 | 257 |
|
247 | 258 | private void renderIcon(IndicatorLocation location, float uvCoordinate, GuiGraphics context) { |
248 | | - ResourceLocation streamIcons = new ResourceLocation("lotaslight", "stream_indicator.png"); //@ResourceLocation; |
| 259 | + //# 1.21.11 |
| 260 | +//$$ Identifier streamIcons = Identifier.fromNamespaceAndPath("lotaslight", "stream_indicator.png"); |
| 261 | + //# 1.21.1 |
| 262 | +//$$ ResourceLocation streamIcons = ResourceLocation.fromNamespaceAndPath("lotaslight", "stream_indicator.png"); |
| 263 | + //# def |
| 264 | + ResourceLocation streamIcons = new ResourceLocation("lotaslight", "stream_indicator.png"); |
| 265 | + //# end |
249 | 266 |
|
250 | 267 | int x = 0; |
251 | 268 | int y = 0; |
|
0 commit comments