Expose the fluid that a block was constructed with, useful for 'non-default'
configuration of fluidblocks. Shouldn't be used outside of this purpose.
This commit is contained in:
parent
50608986fe
commit
96cbadb874
|
@ -50,6 +50,13 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
|
|||
|
||||
protected final String fluidName;
|
||||
|
||||
/**
|
||||
* This is the fluid used in the constructor. Use this reference to configure things
|
||||
* like icons for your block. It might not be active in the registry, so do
|
||||
* NOT expose it.
|
||||
*/
|
||||
protected final Fluid definedFluid;
|
||||
|
||||
public BlockFluidBase(Fluid fluid, Material material)
|
||||
{
|
||||
super(material);
|
||||
|
@ -65,6 +72,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
|
|||
this.densityDir = fluid.density > 0 ? -1 : 1;
|
||||
fluid.setBlock(this);
|
||||
|
||||
this.definedFluid = fluid;
|
||||
displacements.putAll(defaultDisplacements);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue