age-series / ElectricalAge

Electrical Age (ELN) is a Minecraft Mod offering the ability to perform large-scale in-game electrical simulations.
Other
66 stars 32 forks source link

Add Electric Fans and Air ducting #201

Closed genestrashcan closed 4 years ago

genestrashcan commented 4 years ago

Add Electric Fans and air ducting

Types of Fans to start with (there are MANY more kinds than this,,,)

I have a long term idea for this that would make industrial ventilation and fans useful for more than just looks. Let's start by just modeling and animating and implementing them to work with wiring for the looks and aesthetics in an industrial / power plant type setting electrical build.

my long term idea was to be able to have certain things in EA generate noxious gases (you can make gases by coding custom liquids through the forge fluid coding API for liquids.

The following Coding from forge is how you make a custom fluid a gas so it flows upwards,

public class CustomGasFluid extends Fluid { public CustomGasFluid() { super("gas_fluid"); setDensity(-100); setViscosity(1000); setGaseous(true); // This line here makes the fluid a gas FluidRegistry.registerFluid(this); }}

Once you implemented custom gases such as creating Carbon Monoxide and smoke from burning coal or fuel to run a turbine, you could code fans to be able to move and push gases such as ones that rose to the ceiling through them and outside where the gases would go away, This would make it so you needed air ducting connected to ventilation fans or exhaust fans in the roof or walls of a powerplant fuel-burning room to remove and exhaust the toxic poisonous gases created.

some other ideas I had for fans are

Grissess commented 4 years ago

Forge's "gaseous" fluids are a bit clunky: they're basically liquids, but instead of propagating "down" (-Y), they propagate "up" (+Y). A real gas disperses, and (barring reactions) multiple gases can be in a simple mixture determined by their partial pressures.

Incidentally, one of the best places I've seen this implemented is in SS13/BS12, where each tile has a map from gas to partial pressure, and the total pressure drives diffusion. It's a 2D tile-based game and not known for its performance. "Oxygen Not Included" tries for the same aesthetic, but has some important limitations (including not allowing such mixtures).

Given at least the extra dimension, I'm not sure Minecraft's engine is ready for this. At the very least, such a large overhaul might best be separated into another mod. And doing the "simpler" thing--making Forge "gaseous" fluids--is probably just going to result in annoying fluid spam (of the kind you'd expect from griefing).

I'm open to ideas that make it more plausible, nonetheless.

genestrashcan commented 4 years ago

@Grissess - a Gases mod has already been created for Minecraft.

Another use for fans would be to bring ventilation underground where nasty gases could naturally generate.

https://www.youtube.com/watch?v=5H7r-n_mfdw

jrddunbr commented 4 years ago

Considering the port is starting and this is nontrivial to code and for performance, I'm shooting this down. Make another mod and we might integrate in the future.