Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Sour_Tooth

Members
  • Joined

  • Last visited

  1. I’ll test this tomorrow. Thanks for your help!
  2. How would this prevent a new color being generated when Minecraft launches? If I understand you correctly, the grass color at (0, 0) would still be equal to randomColor. If so, then the grass at (0, 0) would still be given a new color at launch.
  3. Thanks for responding! 1. The code I posted was extracted from a much larger chunk of code. If you’d like, I can update the post with all the code necessary to compile and execute the mod in Minecraft. 2. This seems like it could work, but I’ll have to do some more research.
  4. Greetings, I am trying to make a mod that randomly generates biomes. My end goal is to call upon a method to generate a biome. Part of my code is this random number generator that generates the color of the grass. static class BiomeGenCustom extends Biome { public RandomBiome() { int Color = myRandomBiome.randomColor(); @SideOnly(Side.CLIENT) public int getGrassColorAtPos(BlockPos pos) { return -Color; } } The issue I've encountered is that myBiome's grass color is generated when Minecraft is launched. Consequently, myBiome's grass color will be re-generated (and changed) every time Minecraft is launched. What I would like to happen is for myBiome's grass color to be generated when the world is made, and stay the same thenceforth. My current idea entails saving myBiome's grass color to myBiome.txt, and referencing that stored number on world load. I, however, have no clue as to how I would approach implementing this idea. If you have any questions, let me know. Thanks, - Riley (I am using 1.12.2)

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.