Posted April 15, 20205 yr Hey guys, Pretty simple question, im trying to get the game to disable clouds when you enter a desert biome, I have the first half of that equation sorted but cant quite figure out how to disable the clouds (If its even possible!) Im new to forge and the complete lack of comprehensive documentation isn't a great help haha. Any help appreciated! Cheers Edited April 15, 20205 yr by Callan2256
April 15, 20205 yr I think clouds are disabled on "Fast" Graphics settings. Maybe you can pull something out of that.
April 15, 20205 yr Author Managed to get it working. Code posted below should anyone come across this issue in the future, please note that the code is janky as hell as a result with how unfamiliar I am with forge. (So if you have any recommendations on where I can improve it feel free to let me know) @SubscribeEvent public void cloudRemover(TickEvent.PlayerTickEvent event) { PlayerEntity p = event.player; Biome biome = p.world.func_226691_t_(p.getPosition()); String biomeName = biome.getTranslationKey(); GameSettings settings = Minecraft.getInstance().gameSettings; if (biomeName.contains("desert")) { settings.cloudOption = CloudOption.OFF; } else { settings.cloudOption = CloudOption.FANCY; } }
April 15, 20205 yr 19 minutes ago, Callan2256 said: (So if you have any recommendations on where I can improve it feel free to let me know) If you aren't already you need to make sure your event only runs on the client, because otherwise that will crash the dedicated server. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
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.