A new oxygen distribution system

Justinjah91

Member
Mar 3, 2013
25
2
3
32
As of right now, the oxygen distributors simply create a bubble of breathable air around them. They have two values above them: P (which I'm assuming is pressure) and S (no idea on this one). I would really like to see this system revamped so that one oxygen distributor would completely fill a sealed base with oxygen. Solid blocks would obviously prevent oxygen from escaping, as would dual airlock systems. The pressure created by the distributor would depend on the size of its source of oxygen (leaves) as well as how much space it was providing oxygen for. In real life, the alveoli in human lungs cannot function below 15 kPa (2.2 psi for you standard people), so you would need to maintain that minimum pressure in your base to stay alive. I'm by no means a programmer, but I believe that would remove the need for an oxygen block, and may therefore help with technical bugs such as: 1)oxygen breaking redstone connections at corners 2)oxygen preventing piston deployment.

Oh, and just to clarify, an oxygen distributor out in the open on the surface of the moon would have no effect, and neither would a distributor in a base with a hole in the wall.
 
  • Like
Reactions: PureTryOut

Bcbear

Member
Mar 6, 2013
7
2
3
34
Here's an idea... (warning, WALL O' TEXT AHEAD, approach at own risk)

Have the distributor (on placement) begin calculating the blocks it requires to pump oxygen into.
Here's an idea of how it might do that:

  1. Is distributor under direct "sunlight" (visible to the lunar "sky") Yes? ---> Error, unable to fill space, space too large. End... No? ---> Continue to 2.
  2. Then it would start looking around itself in constantly-growing cubes, or spheres, etc. and would stop searching in a direction if it met an intervening solid block that you can define (if you want to say that a wool house on the moon isn't really airtight, for example... :p) It would then check to see if any of those blocks are visible from the sky. Yes? ---> Error, unable to fill space, space too large, End... No? ---Continue to 3.
  3. It would count the blocks on every iteration of the loop, and display a number above the distributor. The more blocks of "air" it needs to create, the more leaves/trees need to be near the collector(s). (Would be possible at this point to create a limit on the amount of atmosphere each distributor can maintain if you wanted to, and if another distributor(s) was detected during the earlier steps, add to the number of maintainable atmosphere blocks appropriately.
  4. Check to see if distributor(s) are receiving enough pressure. [ex: 900/100 bsi?(Blocks per square inch :p ) Nope! Build a bigger oxygen farm. (You would see the required oxygen for your area above the distributor after it was done calculating.) 1000/1000? ---> Continue to 5 OR just fill area with oxygen]
  5. Begin filling spaces with air. This could use the same sort of loops as the search method, and would begin to fill the base one block at a time per distributor (if you wanted how fast a base gains atmosphere to be a function of the number of distributors, that is... which if you used this system, would be in my opinion, the way to go.)
As for the issue of bases becoming depressurized via "accidental" mining...
Is it possible to have oxygen blocks test the other blocks around them whenever they have a space adjacent to them that contains neither a Galacticraft oxygen block nor a solid block? (a normal minecraft "air" block)
If so, then every time a block beside a GC oxygen block is replaced with an air block, it would check that block, and any other air blocks that are attached to it for "sky" above it, if so, remove all oxygen blocks adjacent to each other. Add each block to the distributor upper limit, and if they exceed the capacity of the distributor, or the amount of oxygen being supplied by the collectors, remove all oxygen blocks adjacent to each other. (As OP posted about pressure being required to breathe...) Until the hole is fixed, the "sky" condition on the distributor checking would remain true, and it would stop producing oxygen.
I'm not sure that this is the best way, but with my small amount of knowledge with java, I know that the idea is at least possible, but I am unsure if minecraft/forge has the required functions to do this... or how well it handles checks like that...


Anyway, just the two cents of a GC fan who wants you to keep up the good work!
Cheers!
~Bcbear
 
  • Like
Reactions: alexljn5

Justinjah91

Member
Mar 3, 2013
25
2
3
32
Almost exactly what I was thinking, but with one small difference. I propose that we remove the idea of the oxygen block. Instead, assign a pressure to the vanilla air blocks, and if that pressure is not adequate for life, you take damage. The pressure would be constant throughout one room/base just like in real life (unless you use airlocks to make areas of different pressure in your base). The method for checking if a block is visible to the sky is perfect though. So rather than having the oxygen blocks check for air next to them, just have the distributor periodically check for a path to the sky (every 5 seconds or so).
 

Bcbear

Member
Mar 6, 2013
7
2
3
34
I was assuming that the vanilla "air" block could not be changed in any way.
This is why I opted for an algorithm that checks for the presence of the air blocks when an adjacent block is turned into air as opposed to making them do something every x seconds...

If so, then all the better, the distributors can check to see if the base is fully enclosed, and if so, calculate internal volume and set that as a requirement for any attached collectors.
related idea
 
Feb 24, 2013
40
8
8
27
He's opting not to change any .class files, so air modification is a no-go. I posted something similar to this.
 

Bcbear

Member
Mar 6, 2013
7
2
3
34
That's what i figured. I'd be very interested to see what Micdoodle8 thinks of this idea myself...
 

Justinjah91

Member
Mar 3, 2013
25
2
3
32
Like I said, I don't know much programming, but couldn't you use a table/matrix/array (or whatever its called in java) to store pressure values for the air? That way you wouldn't actually be altering the air block, but you would have a table that stores what kind of block is at a given coordinate, and then assign a pressure to it if it is air? And then compare the player's coordinates with that list?
 

Justinjah91

Member
Mar 3, 2013
25
2
3
32
It seems like it wouldn't require alteration of any class files, but I know nothing of java so yeah...
 

Share this page