suprB Posted January 1, 2024 Posted January 1, 2024 (edited) I am updating a mod from 1.18.2. However, there are some parts I cannot figure out, mainly because I cannot find new alternatives as some classes have been removed. These are the parts: ProgressOption, CycleOption & Option: Spoiler private static final Option[] OPTIONS = new Option[] { MobOptions.INVINCIBLE , MobOptions.RARITY }; // MobOptions class... public static final ProgressOption RARITY = new ProgressOption("cs.mobs.rarity", 0.1, 1, 0.001F, gameSettings -> Config.CLIENT.mobs.spawn.rarity.get(), (gamesettings, value) -> { Config.CLIENT.mobs.spawn.rarity.set(value); Config.save(); }, (gameSettings, option) -> Component.translatable("cs.mobs.rarity.format") ); public static final CycleOption<Boolean> INVINCIBLE = CycleOption.createOnOff("cs.mobs.invincible", (settings) -> Config.CLIENT.mobs.invincible.get(), (settings, function, value) -> { Config.CLIENT.mobs.invincible.set(value); Config.save(); } ); Hide Crosshair: Spoiler public void onRenderOverlay(RenderGameOverlayEvent.PreLayer event) { Crosshair crosshair = CrosshairHandler.get().getCurrentCrosshair(); if (event.getOverlay() == ForgeIngameGui.CROSSHAIR_ELEMENT && (crosshair == null || crosshair.isDefault())) { event.setCanceled(true); } } The problem is that I don't know what's the alternative to Option, ProgressOption and CycleOption (there is CycleButton but I cannot find the others) and there is no RenderGameOverlayEvent or ForgeIngameGui. How can I update this? Edited January 1, 2024 by suprB Add a comment Quote
warjort Posted January 1, 2024 Posted January 1, 2024 I have no idea about the first one. I suggest you look at where those classes are used by Mojang in 1.18.2, then compare it with the corresponding code in 1.19.2 This will probably help with the second one? https://forums.minecraftforge.net/topic/115993-how-to-remove-the-sight-cross-in-the-center-of-the-screen/?do=findComment&comment=512655 Quote Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post.
suprB Posted January 1, 2024 Author Posted January 1, 2024 2 hours ago, warjort said: This will probably help with the second one? https://forums.minecraftforge.net/topic/115993-how-to-remove-the-sight-cross-in-the-center-of-the-screen/?do=findComment&comment=512655 Thank you very much, this helped! I'll try to figure out how to update the other part... It's the only thing I have left. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.