Package net.minecraftforge.fluids
Class FluidType.Properties
java.lang.Object
net.minecraftforge.fluids.FluidType.Properties
- Enclosing class:
- FluidType
The properties of the fluid. The simple forms of each property can
 be specified while more complex logic can be overridden in the 
FluidType.- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate @Nullable BlockPathTypesprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate intprivate Stringprivate floatprivate intprivate doubleprivate @Nullable BlockPathTypesprivate Rarityprivate final Map<SoundAction,SoundEvent> private booleanprivate intprivate int
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionadjacentPathType(@Nullable BlockPathTypes adjacentPathType) Sets the path type of the adjacent fluid.canConvertToSource(boolean canConvertToSource) Sets whether the fluid can create a source.canDrown(boolean canDrown) Sets whether the fluid can drown something.canExtinguish(boolean canExtinguish) Sets whether the fluid can extinguish.canHydrate(boolean canHydrate) Sets whether the fluid can hydrate.canPushEntity(boolean canPushEntity) Sets whether the fluid can push an entity.canSwim(boolean canSwim) Sets whether the fluid can be swum in.static FluidType.Propertiescreate()Creates a new instance of the properties.density(int density) Sets the density of the fluid.descriptionId(String descriptionId) Sets the identifier representing the name of the fluid type.fallDistanceModifier(float fallDistanceModifier) Sets how much the fluid should scale the damage done when hitting the ground per tick.lightLevel(int lightLevel) Sets the light level emitted by the fluid.motionScale(double motionScale) Sets how much the velocity of the fluid should be scaled by.pathType(@Nullable BlockPathTypes pathType) Sets the path type of this fluid.Sets the rarity of the fluid.sound(SoundAction action, SoundEvent sound) Sets a sound to play when a certain action is performed.supportsBoating(boolean supportsBoating) Sets whether the fluid supports boating.temperature(int temperature) Sets the temperature of the fluid.viscosity(int viscosity) Sets the viscosity, or thickness, of the fluid.
- 
Field Details- 
descriptionId
- 
motionScaleprivate double motionScale
- 
canPushEntityprivate boolean canPushEntity
- 
canSwimprivate boolean canSwim
- 
canDrownprivate boolean canDrown
- 
fallDistanceModifierprivate float fallDistanceModifier
- 
canExtinguishprivate boolean canExtinguish
- 
canConvertToSourceprivate boolean canConvertToSource
- 
supportsBoatingprivate boolean supportsBoating
- 
pathType
- 
adjacentPathType
- 
sounds
- 
canHydrateprivate boolean canHydrate
- 
lightLevelprivate int lightLevel
- 
densityprivate int density
- 
temperatureprivate int temperature
- 
viscosityprivate int viscosity
- 
rarity
 
- 
- 
Constructor Details- 
Propertiesprivate Properties()
 
- 
- 
Method Details- 
createCreates a new instance of the properties.- Returns:
- the property holder instance
 
- 
descriptionIdSets the identifier representing the name of the fluid type.- Parameters:
- descriptionId- the identifier representing the name of the fluid type
- Returns:
- the property holder instance
 
- 
motionScaleSets how much the velocity of the fluid should be scaled by.- Parameters:
- motionScale- a scalar to multiply to the fluid velocity
- Returns:
- the property holder instance
 
- 
canPushEntitySets whether the fluid can push an entity.- Parameters:
- canPushEntity- if the fluid can push an entity
- Returns:
- the property holder instance
 
- 
canSwimSets whether the fluid can be swum in.- Parameters:
- canSwim- if the fluid can be swum in
- Returns:
- the property holder instance
 
- 
canDrownSets whether the fluid can drown something.- Parameters:
- canDrown- if the fluid can drown something
- Returns:
- the property holder instance
 
- 
fallDistanceModifierSets how much the fluid should scale the damage done when hitting the ground per tick.- Parameters:
- fallDistanceModifier- a scalar to multiply to the fall damage
- Returns:
- the property holder instance
 
- 
canExtinguishSets whether the fluid can extinguish.- Parameters:
- canExtinguish- if the fluid can extinguish
- Returns:
- the property holder instance
 
- 
canConvertToSourceSets whether the fluid can create a source.- Parameters:
- canConvertToSource- if the fluid can create a source
- Returns:
- the property holder instance
 
- 
supportsBoatingSets whether the fluid supports boating.- Parameters:
- supportsBoating- if the fluid supports boating
- Returns:
- the property holder instance
 
- 
pathTypeSets the path type of this fluid.- Parameters:
- pathType- the path type of this fluid
- Returns:
- the property holder instance
 
- 
adjacentPathTypeSets the path type of the adjacent fluid. Path types with a negative malus are not traversable. Pathfinding will favor paths consisting of a lower malus.- Parameters:
- adjacentPathType- the path type of this fluid
- Returns:
- the property holder instance
 
- 
soundSets a sound to play when a certain action is performed.- Parameters:
- action- the action being performed
- sound- the sound to play when performing the action
- Returns:
- the property holder instance
 
- 
canHydrateSets whether the fluid can hydrate.Hydration is an arbitrary word which depends on the implementation. - Parameters:
- canHydrate- if the fluid can hydrate
- Returns:
- the property holder instance
 
- 
lightLevelSets the light level emitted by the fluid.- Parameters:
- lightLevel- the light level emitted by the fluid
- Returns:
- the property holder instance
- Throws:
- IllegalArgumentException- if light level is not between [0,15]
 
- 
densitySets the density of the fluid.- Parameters:
- density- the density of the fluid
- Returns:
- the property holder instance
 
- 
temperatureSets the temperature of the fluid.- Parameters:
- temperature- the temperature of the fluid
- Returns:
- the property holder instance
 
- 
viscositySets the viscosity, or thickness, of the fluid.- Parameters:
- viscosity- the viscosity of the fluid
- Returns:
- the property holder instance
- Throws:
- IllegalArgumentException- if viscosity is negative
 
- 
raritySets the rarity of the fluid.- Parameters:
- rarity- the rarity of the fluid
- Returns:
- the property holder instance
 
 
-