public interface IForgeFluid
Modifier and Type | Method and Description |
---|---|
FluidAttributes |
getAttributes()
Retrieves the non-vanilla fluid attributes, including localized name.
|
default float |
getExplosionResistance(IFluidState state,
IWorldReader world,
BlockPos pos,
Entity exploder,
Explosion explosion)
Location sensitive version of getExplosionResistance
|
default Fluid |
getFluid() |
java.util.Set<ResourceLocation> |
getTags()
Retrieves a list of tags names this is known to be associated with.
|
default java.lang.Boolean |
isAABBInsideLiquid(IFluidState state,
IWorldReader world,
BlockPos pos,
AxisAlignedBB boundingBox)
Called when entities are moving to check if they are inside a liquid
|
default java.lang.Boolean |
isAABBInsideMaterial(IFluidState state,
IWorldReader world,
BlockPos pos,
AxisAlignedBB boundingBox,
Material materialIn)
Called when boats or fishing hooks are inside the block to check if they are inside
the material requested.
|
default boolean |
isEntityInside(IFluidState state,
IWorldReader world,
BlockPos pos,
Entity entity,
double yToTest,
Tag<Fluid> tag,
boolean testingHead)
Called when the entity is inside this block, may be used to determined if the entity can breathing,
display material overlays, or if the entity can swim inside a block.
|
default Fluid getFluid()
default boolean isEntityInside(IFluidState state, IWorldReader world, BlockPos pos, Entity entity, double yToTest, Tag<Fluid> tag, boolean testingHead)
world
- that is being tested.pos
- position thats being tested.entity
- that is being tested.yToTest,
- primarily for testingHead, which sends the the eye level of the entity, other wise it sends a y that can be tested vs liquid height.tag
- Fluid categorytestingHead
- when true, its testing the entities head for vision, breathing ect... otherwise its testing the body, for swimming and movement adjustment.@Nullable default java.lang.Boolean isAABBInsideMaterial(IFluidState state, IWorldReader world, BlockPos pos, AxisAlignedBB boundingBox, Material materialIn)
world
- world that is being tested.pos
- block thats being tested.boundingBox
- box to test, generally the bounds of an entity that are besting tested.materialIn
- to check for.@Nullable default java.lang.Boolean isAABBInsideLiquid(IFluidState state, IWorldReader world, BlockPos pos, AxisAlignedBB boundingBox)
world
- world that is being tested.pos
- block thats being tested.boundingBox
- box to test, generally the bounds of an entity that are besting tested.default float getExplosionResistance(IFluidState state, IWorldReader world, BlockPos pos, @Nullable Entity exploder, Explosion explosion)
world
- The current worldpos
- Block position in worldexploder
- The entity that caused the explosion, can be nullexplosion
- The explosionjava.util.Set<ResourceLocation> getTags()
FluidAttributes getAttributes()