Class DefaultImplementations
java.lang.Object
etithespirit.orimod.spiritmaterial.defaults.DefaultImplementations
Default implementations for sound behaviors on blocks.
- Author:
- Eti
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Fluid levels at or below this are considered shallow (puddle), and above is considered deep -
Method Summary
Modifier and TypeMethodDescriptionstatic SpiritMaterial
getWaterMaterial
(net.minecraft.world.entity.Entity entity, net.minecraft.core.BlockPos on, net.minecraft.core.BlockPos in, boolean isStandingIn) A default implementation ofISpiritMaterialAcquisitionFunction
that returns the appropriate material for water blocks based on how full the block is.static SpiritMaterial
getWoodMaterial
(net.minecraft.world.entity.Entity entity, net.minecraft.core.BlockPos on, net.minecraft.core.BlockPos in, boolean isStandingIn) A default implementation ofISpiritMaterialAcquisitionFunction
that returns the appropriate material for wood blocks based on the weather and nearby objects.
-
Field Details
-
SHALLOW_WATER_LEVEL
public static final int SHALLOW_WATER_LEVELFluid levels at or below this are considered shallow (puddle), and above is considered deep- See Also:
-
-
Method Details
-
getWoodMaterial
@Nonnull public static SpiritMaterial getWoodMaterial(net.minecraft.world.entity.Entity entity, net.minecraft.core.BlockPos on, net.minecraft.core.BlockPos in, boolean isStandingIn) A default implementation ofISpiritMaterialAcquisitionFunction
that returns the appropriate material for wood blocks based on the weather and nearby objects.- Parameters:
entity
- The entity stepping on this block.on
- The block being walked on top of.in
- The block being walked inside of.isStandingIn
- Whether or not the block that was associated with a custom material is the one that is being stood inside of (if false, the block associated is being walked on top of)- Returns:
- A better suited Spirit Material given the context of the given wood block.
-
getWaterMaterial
@Nonnull public static SpiritMaterial getWaterMaterial(net.minecraft.world.entity.Entity entity, net.minecraft.core.BlockPos on, net.minecraft.core.BlockPos in, boolean isStandingIn) A default implementation ofISpiritMaterialAcquisitionFunction
that returns the appropriate material for water blocks based on how full the block is.- Parameters:
entity
- The entity stepping on this block.on
- The block being walked on top of.in
- The block being walked inside of.isStandingIn
- Whether or not the block that was associated with a custom material is the one that is being stood inside of (if false, the block associated is being walked on top of)- Returns:
- A better suited Spirit Material given the context of the given water block.
-