mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 23:03:01 +00:00
Better gas management
This commit is contained in:
1 parent
8ae8652aff
commit
3d86b75da4
23 files changed
+149
-115
No files matched your search
@@ -223,22 +223,32 @@ public class Gas
|
||||
* Registers a new fluid out of this Gas or gets one from the FluidRegistry.
|
||||
* @return this Gas object
|
||||
*/
|
||||
public Gas registerFluid()
|
||||
public Gas registerFluid(String name)
|
||||
{
|
||||
if(fluid == null)
|
||||
{
|
||||
if(FluidRegistry.getFluid(getName()) == null)
|
||||
if(FluidRegistry.getFluid(name) == null)
|
||||
{
|
||||
fluid = new Fluid(getName(), getIcon(), getIcon()).setGaseous(true);
|
||||
fluid = new Fluid(name, getIcon(), getIcon());
|
||||
FluidRegistry.registerFluid(fluid);
|
||||
}
|
||||
else {
|
||||
fluid = FluidRegistry.getFluid(getName());
|
||||
fluid = FluidRegistry.getFluid(name);
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a new fluid out of this Gas or gets one from the FluidRegistry.
|
||||
* Uses default gas name.
|
||||
* @return this Gas object
|
||||
*/
|
||||
public Gas registerFluid()
|
||||
{
|
||||
return registerFluid(getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
|
||||
Reference in new issue
Block a user