Class DefaultImplementations

java.lang.Object
etithespirit.orimod.spiritmaterial.defaults.DefaultImplementations

public final class DefaultImplementations extends Object
Default implementations for sound behaviors on blocks.
Author:
Eti
  • Field Details

    • SHALLOW_WATER_LEVEL

      public static final int SHALLOW_WATER_LEVEL
      Fluid 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 of ISpiritMaterialAcquisitionFunction 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 of ISpiritMaterialAcquisitionFunction 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.