public interface IAirHandlerMachine extends IAirHandler, IManoMeasurable
Don't implement this class yourself! Use one of the methods in IAirHandlerMachineFactory to obtain
a suitable implementation for your tile entity.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
IAirHandlerMachine.Connection
Represents a connection to a neighbouring air handler.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deserializeNBT(net.minecraft.nbt.CompoundNBT compound) |
java.util.List<IAirHandlerMachine.Connection> |
getConnectedAirHandlers(net.minecraft.tileentity.TileEntity ownerTE)
Get a list of all air handlers connected to this one.
|
float |
getCriticalPressure()
Get the "critical" pressure level, which is the hard maximum pressure for this handler.
|
float |
getDangerPressure()
Get the "danger" pressure level.
|
net.minecraft.util.Direction |
getSideLeaking()
Get the side which is leaking air, if any.
|
net.minecraft.nbt.INBT |
serializeNBT() |
void |
setConnectedFaces(java.util.List<net.minecraft.util.Direction> sides)
Set the connected faces of this air handler.
|
void |
setHasSecurityUpgrade(boolean hasSecurityUpgrade)
Should be called by the owning tile entity when its security upgrades change.
|
void |
setPressure(float newPressure)
Set the pressure of this handler directly.
|
void |
setSideLeaking(net.minecraft.util.Direction dir)
Mark a face of the air handler as leaking or otherwise.
|
void |
setVolumeUpgrades(int newVolumeUpgrades)
Should be called by the owning tile entity when its volume upgrades change.
|
void |
tick(net.minecraft.tileentity.TileEntity ownerTE)
Must be called every tick by the owning tile entity.
|
addAir, getAir, getBaseVolume, getPressure, getVolume, maxPressure, setBaseVolumeprintManometerMessagefloat getDangerPressure()
float getCriticalPressure()
void setPressure(float newPressure)
IAirHandler.addAir(int) method should be used.newPressure - the new pressure, in barvoid setVolumeUpgrades(int newVolumeUpgrades)
newVolumeUpgrades - new number of volume upgradesvoid setHasSecurityUpgrade(boolean hasSecurityUpgrade)
hasSecurityUpgrade - true if the holder has one or more security upgradesvoid tick(net.minecraft.tileentity.TileEntity ownerTE)
ownerTE - the owning tile entityvoid setSideLeaking(@Nullable
net.minecraft.util.Direction dir)
pressure * 40 + 20 mL.
(Note: in theory, an air handler could leak in multiple directions at once, but this is a simplified implementation to keep the code straightforward & efficient, while still being effective)
dir - the direction the leak is occurring (affects particle velocities), or null for no leak@Nullable net.minecraft.util.Direction getSideLeaking()
java.util.List<IAirHandlerMachine.Connection> getConnectedAirHandlers(net.minecraft.tileentity.TileEntity ownerTE)
ownerTE - the owning tile entitynet.minecraft.nbt.INBT serializeNBT()
void deserializeNBT(net.minecraft.nbt.CompoundNBT compound)
void setConnectedFaces(java.util.List<net.minecraft.util.Direction> sides)
AbstractBlock.neighborChanged(BlockState, World, BlockPos, Block, BlockPos, boolean).
This also invalidates any cached neighbour data.
sides - a list of sides on which this air handler should be offered as a capability