Posted August 24, 20223 yr This https://ibb.co/hgnc7dm (Sorry for the link, it seems I chose a bad photo hosting or did not understand how to upload a photo to the forum correctly) Just turn it off temporarily. Edited August 24, 20223 yr by Luckydel
August 24, 20223 yr Subscribe to RenderGuiOverlayEvent.Pre and event.setCancel(true) for whatever conditions you want. The overlay you want is: VanillaGuiOverlay.CROSSHAIR 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.
August 24, 20223 yr Author warjort, Yes, thanks, I realized that I need this event, I was able to remove the entire gui, but I don’t understand how I can disable CROSSHAIR
August 24, 20223 yr @Mod.EventBusSubscriber(modid = MODID, value = Dist.CLIENT) public class ClientEvents { @SubscribeEvent public static void renderCrossHair(RenderGuiOverlayEvent.Pre event) { if (VanillaGuiOverlay.CROSSHAIR.type() == event.getOverlay()) { if (Minecraft.getInstance().player.getItemInHand(InteractionHand.OFF_HAND).is(Items.DIAMOND)) { event.setCanceled(true); } } } } Now put a diamond in your offhand/shield slot. 🙂 Edited August 24, 20223 yr by warjort 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.
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.