How to make Gases like Glenn's Gases Mod?

Started by SparkleArts on

Topic category: Help with modding (Java Edition)

Last seen on 20:06, 19. Apr 2024
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make Gases like Glenn's Gases Mod?

I'm currently developing a massive Mod that implements a lot of Features.

One of it are Chemical Features and I need some help how exactly can I make those Gases like in Glenn's Gases Mod.

Here is the Mod.

Last seen on 20:08, 17. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
My guess is that the gasses…
Mon, 01/02/2023 - 17:41

My guess is that the gasses are just insubstantial blocks that can spread or move in various directions. (By converting adjacent air blocks to themselves, or reverting to air.) If you wanted to make them a bit more complex, though, I'd do something like this:

  • For each gas, make blocks with various levels of concentration. (Maybe 1 to 16), with more highly concentrated gasses being more opaque. Real gasses spread from higher concentration to lower concentration, and your gasses could do the same; higher concentration gasses could add concentration to adjacent blocks of the same gas by depleting their own, or spread lower concentration blocks.
  • ...Of course, I personally find the gas blocks from the mod kind of ugly, so you could also try making the blocks invisible, but with particle effects inside, like smoke.
  • ...There's a variety of unique ways you could make gasses spread based on how they behave when ticked, though you'll probably want some mechanism to make them dissipate entirely, so they don't just endlessly spread the lowest concentration block everywhere.
  • You can execute procedures when an entity collides inside blocks, which would be pretty easy given that the gas blocks don't have collisions. (Though you could change the speed factor if you want them to slow the player down.) 

Honestly, the hardest part would be getting these to generate naturally. For your gasses to spread like this, they'd need to tick regularly. Naturally generated blocks don't do this, at least not without a procedure to update them. (One solution would be to, say, have some sort of origin block- a geyser or something- that pumps out gas when randomly ticked. This would also solve the dissipation problem.) ...And of course, that many constantly ticking blocks in your world could also cause performance issues.

Last seen on 20:06, 19. Apr 2024
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't plan to generate the…
Sat, 01/07/2023 - 16:52

I don't plan to generate the Gases naturally, more over they can be crafted with a custom Crafting System.

 

I have a lot of Ideas of my amazing Mod.