Class DefaultSableCompanion

java.lang.Object
dev.ryanhcode.sable.companion.impl.DefaultSableCompanion
All Implemented Interfaces:
SableCompanion

@Internal public final class DefaultSableCompanion extends Object implements SableCompanion
Default implementation of SableCompanion for when Sable is missing at runtime.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface dev.ryanhcode.sable.companion.SableCompanion

    SableCompanion.LoadPriority
  • Field Summary

    Fields inherited from interface dev.ryanhcode.sable.companion.SableCompanion

    INSTANCE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    distanceSquaredWithSubLevels(net.minecraft.world.level.Level level, double aX, double aY, double aZ, double bX, double bY, double bZ)
    Computes the distance squared between two points, taking into account sublevels and their plots/poses.
    double
    distanceSquaredWithSubLevels(net.minecraft.world.level.Level level, net.minecraft.core.Position a, double bX, double bY, double bZ)
    Computes the distance squared between two points, taking into account sublevels and their plots/poses.
    double
    distanceSquaredWithSubLevels(net.minecraft.world.level.Level level, net.minecraft.core.Position a, net.minecraft.core.Position b)
    Computes the distance squared between two points, taking into account sublevels and their plots/poses.
    double
    distanceSquaredWithSubLevels(net.minecraft.world.level.Level level, org.joml.Vector3dc a, double bX, double bY, double bZ)
    Computes the distance squared between two points, taking into account sublevels and their plots/poses.
    double
    distanceSquaredWithSubLevels(net.minecraft.world.level.Level level, org.joml.Vector3dc a, org.joml.Vector3dc b)
    Computes the distance squared between two points, taking into account sublevels and their plots/poses.
    <S extends SubLevelAccess>
    boolean
    findIncludingSubLevels(net.minecraft.world.level.Level level, net.minecraft.core.Position origin, boolean shouldCheckOrigin, S subLevel, BiFunction<@Nullable S,net.minecraft.core.BlockPos,Boolean> converter)
    Checks positions in a level, including sublevels, for a true value from the converter.
    <S extends SubLevelAccess>
    boolean
    findIncludingSubLevels(net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 origin, boolean shouldCheckOrigin, S subLevel, BiFunction<@Nullable S,net.minecraft.core.BlockPos,Boolean> converter)
    Checks positions in a level, including sublevels, for a true value from the converter.
    getAllIntersecting(net.minecraft.world.level.Level level, BoundingBox3dc bounds)
    Gets all sublevels that intersect with the given bounding box
    net.minecraft.world.level.Level
     
    @Nullable SubLevelAccess
    getContaining(net.minecraft.world.level.Level level, int chunkX, int chunkZ)
    Gets the sub-level that contains the given point in its plot, or null if none do
    net.minecraft.world.phys.Vec3
    getEyePositionInterpolated(net.minecraft.world.entity.Entity entity, float partialTicks)
    Gets the interpolated eye position of an entity, taking their tracking sub-level into account.
    @NotNull org.joml.Vector3d
    getFeetPos(net.minecraft.world.entity.Entity entity, float distanceDown)
    Gets the feet position of an entity, taking their tracking sub-level into account.
    @Nullable SubLevelAccess
    getLastTrackingSubLevel(net.minecraft.world.entity.Entity entity)
    Queries the sub-level an entity is "tracking" last tick, if any.
    @Nullable SubLevelAccess
    getTrackingOrVehicleSubLevel(net.minecraft.world.entity.Entity entity)
    Queries the sub-level an entity is currently tracking, or the vehicle sub-level.
    @Nullable SubLevelAccess
    getTrackingSubLevel(net.minecraft.world.entity.Entity entity)
    Queries the sub-level an entity is currently "tracking", if any.
    @Nullable SubLevelAccess
    getVehicleSubLevel(net.minecraft.world.entity.Entity entity)
     
    net.minecraft.world.phys.Vec3
    getVelocity(net.minecraft.world.level.Level level, SubLevelAccess subLevel, net.minecraft.core.Position pos)
    Gets the global velocity of a point in a sub-level
    net.minecraft.world.phys.Vec3
    getVelocity(net.minecraft.world.level.Level level, SubLevelAccess subLevel, net.minecraft.world.phys.Vec3 pos)
    Gets the global velocity of a point in a sub-level
    org.joml.Vector3d
    getVelocity(net.minecraft.world.level.Level level, SubLevelAccess subLevel, org.joml.Vector3dc pos, org.joml.Vector3d dest)
    Gets the global velocity of a point in a sub-level
    net.minecraft.world.phys.Vec3
    getVelocity(net.minecraft.world.level.Level level, net.minecraft.core.Position pos)
    Gets the global velocity of a point in a level, taking into account sub-level movement.
    net.minecraft.world.phys.Vec3
    getVelocity(net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 pos)
    Gets the global velocity of a point in a level, taking into account sub-level movement.
    org.joml.Vector3d
    getVelocity(net.minecraft.world.level.Level level, org.joml.Vector3dc pos, org.joml.Vector3d dest)
    Gets the global velocity of a point in a level, taking into account sub-level movement.
    net.minecraft.world.phys.Vec3
    getVelocityRelativeToAir(net.minecraft.world.level.Level level, net.minecraft.core.Position pos)
    Gets the global velocity of a point in a level relative to the air, taking into account sublevels and their plots/poses
    net.minecraft.world.phys.Vec3
    getVelocityRelativeToAir(net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 pos)
    Gets the global velocity of a point in a level relative to the air, taking into account sublevels and their plots/poses
    org.joml.Vector3d
    getVelocityRelativeToAir(net.minecraft.world.level.Level level, org.joml.Vector3dc pos, org.joml.Vector3d dest)
    Gets the global velocity of a point in a level relative to the air, taking into account sublevels and their plots/poses
    boolean
    isInPlotGrid(net.minecraft.world.level.Level level, int chunkX, int chunkZ)
    Checks if the plot grid contains the given chunk.
    net.minecraft.world.phys.Vec3
    projectOutOfSubLevel(net.minecraft.world.level.Level level, net.minecraft.core.Position pos)
    Projects a point out of a sublevel, if it is within one
    net.minecraft.world.phys.Vec3
    projectOutOfSubLevel(net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 pos)
    Projects a point out of a sublevel, if it is within one
    org.joml.Vector3d
    projectOutOfSubLevel(net.minecraft.world.level.Level level, org.joml.Vector3dc pos, org.joml.Vector3d dest)
    Projects a point out of a sublevel, if it is within one
    double
    rectilinearDistanceWithSubLevels(net.minecraft.world.level.Level level, double aX, double aY, double aZ, double bX, double bY, double bZ)
    Computes the rectilinear distance between two points, taking into account sublevels and their plots/poses.
    double
    rectilinearDistanceWithSubLevels(net.minecraft.world.level.Level level, net.minecraft.core.Position a, double bX, double bY, double bZ)
    Computes the rectilinear distance between two points, taking into account sublevels and their plots/poses.
    double
    rectilinearDistanceWithSubLevels(net.minecraft.world.level.Level level, net.minecraft.core.Position a, net.minecraft.core.Position b)
    Computes the rectilinear distance between two points, taking into account sublevels and their plots/poses.
    double
    rectilinearDistanceWithSubLevels(net.minecraft.world.level.Level level, org.joml.Vector3dc a, double bX, double bY, double bZ)
    Computes the rectilinear distance between two points, taking into account sublevels and their plots/poses.
    double
    rectilinearDistanceWithSubLevels(net.minecraft.world.level.Level level, org.joml.Vector3dc a, org.joml.Vector3dc b)
    Computes the rectilinear distance between two points, taking into account sublevels and their plots/poses.
    <T, S extends SubLevelAccess>
    T
    runIncludingSubLevels(net.minecraft.world.level.Level level, net.minecraft.core.Position origin, boolean shouldCheckOrigin, S subLevel, BiFunction<S,net.minecraft.core.BlockPos,T> converter)
    Checks positions in a level, including sublevels, for a valid position matching the converter to a non-null value.
    <T, S extends SubLevelAccess>
    T
    runIncludingSubLevels(net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 origin, boolean shouldCheckOrigin, S subLevel, BiFunction<S,net.minecraft.core.BlockPos,T> converter)
    Checks positions in a level, including sublevels, for a valid position matching the converter to a non-null value.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DefaultSableCompanion

      public DefaultSableCompanion()
  • Method Details

    • getAllIntersecting

      public Iterable<SubLevelAccess> getAllIntersecting(net.minecraft.world.level.Level level, BoundingBox3dc bounds)
      Description copied from interface: SableCompanion
      Gets all sublevels that intersect with the given bounding box
      Specified by:
      getAllIntersecting in interface SableCompanion
      Parameters:
      bounds - The bounding box to check.
      NOTE: the bounds must NOT be modified during the iteration. this will cause undefined behavior!
    • getContaining

      @Nullable public @Nullable SubLevelAccess getContaining(net.minecraft.world.level.Level level, int chunkX, int chunkZ)
      Description copied from interface: SableCompanion
      Gets the sub-level that contains the given point in its plot, or null if none do
      Specified by:
      getContaining in interface SableCompanion
      Parameters:
      level - the level to check
      chunkX - the global chunk X position
      chunkZ - the global chunk Z position
      Returns:
      the sub-level that contains the point, or null if none do
    • projectOutOfSubLevel

      public org.joml.Vector3d projectOutOfSubLevel(net.minecraft.world.level.Level level, org.joml.Vector3dc pos, org.joml.Vector3d dest)
      Description copied from interface: SableCompanion
      Projects a point out of a sublevel, if it is within one
      Specified by:
      projectOutOfSubLevel in interface SableCompanion
      Parameters:
      level - the level to check
      pos - the point to project
      Returns:
      the projected point
    • projectOutOfSubLevel

      public net.minecraft.world.phys.Vec3 projectOutOfSubLevel(net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 pos)
      Description copied from interface: SableCompanion
      Projects a point out of a sublevel, if it is within one
      Specified by:
      projectOutOfSubLevel in interface SableCompanion
      Parameters:
      level - the level to check
      pos - the point to project
      Returns:
      the projected point
    • projectOutOfSubLevel

      public net.minecraft.world.phys.Vec3 projectOutOfSubLevel(net.minecraft.world.level.Level level, net.minecraft.core.Position pos)
      Description copied from interface: SableCompanion
      Projects a point out of a sublevel, if it is within one
      Specified by:
      projectOutOfSubLevel in interface SableCompanion
      Parameters:
      level - the level to check
      pos - the point to project
      Returns:
      the projected point
    • runIncludingSubLevels

      @Nullable public <T, S extends SubLevelAccess> T runIncludingSubLevels(net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 origin, boolean shouldCheckOrigin, @Nullable S subLevel, BiFunction<S,net.minecraft.core.BlockPos,T> converter)
      Description copied from interface: SableCompanion
      Checks positions in a level, including sublevels, for a valid position matching the converter to a non-null value. Priority: World -> World, Sub-level -> World, World -> Sub-level
      Specified by:
      runIncludingSubLevels in interface SableCompanion
      Type Parameters:
      T - The type of the resulting value
      Parameters:
      level - The level
      origin - The origin to check
      shouldCheckOrigin - Whether the origin should be checked
      subLevel - The data the origin is assumed to be in
      converter - The function to convert a BlockPos to a non-null value
      Returns:
      The resulting value from the converter, or null if nothing is found for all 3 check sets that are done
    • runIncludingSubLevels

      @Nullable public <T, S extends SubLevelAccess> T runIncludingSubLevels(net.minecraft.world.level.Level level, net.minecraft.core.Position origin, boolean shouldCheckOrigin, @Nullable S subLevel, BiFunction<S,net.minecraft.core.BlockPos,T> converter)
      Description copied from interface: SableCompanion
      Checks positions in a level, including sublevels, for a valid position matching the converter to a non-null value. Priority: World -> World, Sub-level -> World, World -> Sub-level
      Specified by:
      runIncludingSubLevels in interface SableCompanion
      Type Parameters:
      T - The type of the resulting value
      Parameters:
      level - The level
      origin - The origin to check
      shouldCheckOrigin - Whether the origin should be checked
      subLevel - The data the origin is assumed to be in
      converter - The function to convert a BlockPos to a non-null value
      Returns:
      The resulting value from the converter, or null if nothing is found for all 3 check sets that are done
    • findIncludingSubLevels

      public <S extends SubLevelAccess> boolean findIncludingSubLevels(net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 origin, boolean shouldCheckOrigin, @Nullable S subLevel, BiFunction<@Nullable S,net.minecraft.core.BlockPos,Boolean> converter)
      Description copied from interface: SableCompanion
      Checks positions in a level, including sublevels, for a true value from the converter. Priority: World -> World, Sub-level -> World, World -> Sub-level
      Specified by:
      findIncludingSubLevels in interface SableCompanion
      Parameters:
      level - The level
      origin - The origin to check
      shouldCheckOrigin - Whether the origin should be checked
      subLevel - The data the origin is assumed to be in
      converter - The function to convert a BlockPos to a boolean value
      Returns:
      True if any of the checks returned true, otherwise false
    • findIncludingSubLevels

      public <S extends SubLevelAccess> boolean findIncludingSubLevels(net.minecraft.world.level.Level level, net.minecraft.core.Position origin, boolean shouldCheckOrigin, @Nullable S subLevel, BiFunction<@Nullable S,net.minecraft.core.BlockPos,Boolean> converter)
      Description copied from interface: SableCompanion
      Checks positions in a level, including sublevels, for a true value from the converter. Priority: World -> World, Sub-level -> World, World -> Sub-level
      Specified by:
      findIncludingSubLevels in interface SableCompanion
      Parameters:
      level - The level
      origin - The origin to check
      shouldCheckOrigin - Whether the origin should be checked
      subLevel - The data the origin is assumed to be in
      converter - The function to convert a BlockPos to a boolean value
      Returns:
      True if any of the checks returned true, otherwise false
    • distanceSquaredWithSubLevels

      public double distanceSquaredWithSubLevels(net.minecraft.world.level.Level level, org.joml.Vector3dc a, org.joml.Vector3dc b)
      Description copied from interface: SableCompanion
      Computes the distance squared between two points, taking into account sublevels and their plots/poses.
      Specified by:
      distanceSquaredWithSubLevels in interface SableCompanion
      Parameters:
      level - the level to check
      a - the first point
      b - the second point
      Returns:
      the distance squared between the two points
    • distanceSquaredWithSubLevels

      public double distanceSquaredWithSubLevels(net.minecraft.world.level.Level level, org.joml.Vector3dc a, double bX, double bY, double bZ)
      Description copied from interface: SableCompanion
      Computes the distance squared between two points, taking into account sublevels and their plots/poses.
      Specified by:
      distanceSquaredWithSubLevels in interface SableCompanion
      Parameters:
      level - the level to check
      a - the first point
      bX - the second point X
      bY - the second point Y
      bZ - the second point Z
      Returns:
      the distance squared between the two points
    • distanceSquaredWithSubLevels

      public double distanceSquaredWithSubLevels(net.minecraft.world.level.Level level, net.minecraft.core.Position a, net.minecraft.core.Position b)
      Description copied from interface: SableCompanion
      Computes the distance squared between two points, taking into account sublevels and their plots/poses.
      Specified by:
      distanceSquaredWithSubLevels in interface SableCompanion
      Parameters:
      level - the level to check
      a - the first point
      b - the second point
      Returns:
      the distance squared between the two points
    • distanceSquaredWithSubLevels

      public double distanceSquaredWithSubLevels(net.minecraft.world.level.Level level, net.minecraft.core.Position a, double bX, double bY, double bZ)
      Description copied from interface: SableCompanion
      Computes the distance squared between two points, taking into account sublevels and their plots/poses.
      Specified by:
      distanceSquaredWithSubLevels in interface SableCompanion
      Parameters:
      level - the level to check
      a - the first point
      bX - the second point X
      bY - the second point Y
      bZ - the second point Z
      Returns:
      the distance squared between the two points
    • distanceSquaredWithSubLevels

      public double distanceSquaredWithSubLevels(net.minecraft.world.level.Level level, double aX, double aY, double aZ, double bX, double bY, double bZ)
      Description copied from interface: SableCompanion
      Computes the distance squared between two points, taking into account sublevels and their plots/poses.
      Specified by:
      distanceSquaredWithSubLevels in interface SableCompanion
      Parameters:
      level - the level to check
      aX - the first point X
      aY - the first point Y
      aZ - the first point Z
      bX - the second point X
      bY - the second point Y
      bZ - the second point Z
      Returns:
      the distance squared between the two points
    • rectilinearDistanceWithSubLevels

      public double rectilinearDistanceWithSubLevels(net.minecraft.world.level.Level level, org.joml.Vector3dc a, org.joml.Vector3dc b)
      Description copied from interface: SableCompanion
      Computes the rectilinear distance between two points, taking into account sublevels and their plots/poses.
      Specified by:
      rectilinearDistanceWithSubLevels in interface SableCompanion
      Parameters:
      level - the level to check
      a - the first point
      b - the second point
      Returns:
      the rectilinear distance between the two points
    • rectilinearDistanceWithSubLevels

      public double rectilinearDistanceWithSubLevels(net.minecraft.world.level.Level level, net.minecraft.core.Position a, net.minecraft.core.Position b)
      Description copied from interface: SableCompanion
      Computes the rectilinear distance between two points, taking into account sublevels and their plots/poses.
      Specified by:
      rectilinearDistanceWithSubLevels in interface SableCompanion
      Parameters:
      level - the level to check
      a - the first point
      b - the second point
      Returns:
      the rectilinear distance between the two points
    • rectilinearDistanceWithSubLevels

      public double rectilinearDistanceWithSubLevels(net.minecraft.world.level.Level level, org.joml.Vector3dc a, double bX, double bY, double bZ)
      Description copied from interface: SableCompanion
      Computes the rectilinear distance between two points, taking into account sublevels and their plots/poses.
      Specified by:
      rectilinearDistanceWithSubLevels in interface SableCompanion
      Parameters:
      level - the level to check
      a - the first point
      bX - the second point X
      bY - the second point Y
      bZ - the second point Z
      Returns:
      the rectilinear distance between the two points
    • rectilinearDistanceWithSubLevels

      public double rectilinearDistanceWithSubLevels(net.minecraft.world.level.Level level, net.minecraft.core.Position a, double bX, double bY, double bZ)
      Description copied from interface: SableCompanion
      Computes the rectilinear distance between two points, taking into account sublevels and their plots/poses.
      Specified by:
      rectilinearDistanceWithSubLevels in interface SableCompanion
      Parameters:
      level - the level to check
      a - the first point
      bX - the second point X
      bY - the second point Y
      bZ - the second point Z
      Returns:
      the rectilinear distance between the two points
    • rectilinearDistanceWithSubLevels

      public double rectilinearDistanceWithSubLevels(net.minecraft.world.level.Level level, double aX, double aY, double aZ, double bX, double bY, double bZ)
      Description copied from interface: SableCompanion
      Computes the rectilinear distance between two points, taking into account sublevels and their plots/poses.
      Specified by:
      rectilinearDistanceWithSubLevels in interface SableCompanion
      Parameters:
      level - the level to check
      aX - the first point X
      aY - the first point Y
      aZ - the first point Z
      bX - the second point X
      bY - the second point Y
      bZ - the second point Z
      Returns:
      the rectilinear distance between the two points
    • getVelocity

      public org.joml.Vector3d getVelocity(net.minecraft.world.level.Level level, org.joml.Vector3dc pos, org.joml.Vector3d dest)
      Description copied from interface: SableCompanion
      Gets the global velocity of a point in a level, taking into account sub-level movement.
      Specified by:
      getVelocity in interface SableCompanion
      Parameters:
      level - the level to check
      pos - the position of the point
      dest - the vector to hold the result
      Returns:
      the global velocity of the point stored in dest [m/s]
    • getVelocity

      public net.minecraft.world.phys.Vec3 getVelocity(net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 pos)
      Description copied from interface: SableCompanion
      Gets the global velocity of a point in a level, taking into account sub-level movement.
      Specified by:
      getVelocity in interface SableCompanion
      Parameters:
      level - the level to check
      pos - the position of the point
      Returns:
      the global velocity of the point stored in dest [m/s]
    • getVelocity

      public net.minecraft.world.phys.Vec3 getVelocity(net.minecraft.world.level.Level level, net.minecraft.core.Position pos)
      Description copied from interface: SableCompanion
      Gets the global velocity of a point in a level, taking into account sub-level movement.
      Specified by:
      getVelocity in interface SableCompanion
      Parameters:
      level - the level to check
      pos - the position of the point
      Returns:
      the global velocity of the point stored in dest [m/s]
    • getVelocity

      public org.joml.Vector3d getVelocity(net.minecraft.world.level.Level level, SubLevelAccess subLevel, org.joml.Vector3dc pos, org.joml.Vector3d dest)
      Description copied from interface: SableCompanion
      Gets the global velocity of a point in a sub-level
      Specified by:
      getVelocity in interface SableCompanion
      Parameters:
      level - the level to check
      subLevel - the sub-level the point is assumed to be in
      pos - the position of the point
      dest - the vector to hold the result
      Returns:
      the global velocity of the point stored in dest [m/s]
    • getVelocity

      public net.minecraft.world.phys.Vec3 getVelocity(net.minecraft.world.level.Level level, SubLevelAccess subLevel, net.minecraft.world.phys.Vec3 pos)
      Description copied from interface: SableCompanion
      Gets the global velocity of a point in a sub-level
      Specified by:
      getVelocity in interface SableCompanion
      Parameters:
      level - the level to check
      subLevel - the sub-level the point is assumed to be in
      pos - the position of the point
      Returns:
      the global velocity of the point stored in dest [m/s]
    • getVelocity

      public net.minecraft.world.phys.Vec3 getVelocity(net.minecraft.world.level.Level level, SubLevelAccess subLevel, net.minecraft.core.Position pos)
      Description copied from interface: SableCompanion
      Gets the global velocity of a point in a sub-level
      Specified by:
      getVelocity in interface SableCompanion
      Parameters:
      level - the level to check
      subLevel - the sub-level the point is assumed to be in
      pos - the position of the point
      Returns:
      the global velocity of the point stored in dest [m/s]
    • getVelocityRelativeToAir

      public org.joml.Vector3d getVelocityRelativeToAir(net.minecraft.world.level.Level level, org.joml.Vector3dc pos, org.joml.Vector3d dest)
      Description copied from interface: SableCompanion
      Gets the global velocity of a point in a level relative to the air, taking into account sublevels and their plots/poses
      Specified by:
      getVelocityRelativeToAir in interface SableCompanion
      Parameters:
      level - the level to check
      pos - the position of the point
      dest - the vector to hold the result
      Returns:
      the global velocity of the point stored in dest [m/s]
    • getVelocityRelativeToAir

      public net.minecraft.world.phys.Vec3 getVelocityRelativeToAir(net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 pos)
      Description copied from interface: SableCompanion
      Gets the global velocity of a point in a level relative to the air, taking into account sublevels and their plots/poses
      Specified by:
      getVelocityRelativeToAir in interface SableCompanion
      Parameters:
      level - the level to check
      pos - the position of the point
      Returns:
      the global velocity of the point stored in dest [m/s]
    • getVelocityRelativeToAir

      public net.minecraft.world.phys.Vec3 getVelocityRelativeToAir(net.minecraft.world.level.Level level, net.minecraft.core.Position pos)
      Description copied from interface: SableCompanion
      Gets the global velocity of a point in a level relative to the air, taking into account sublevels and their plots/poses
      Specified by:
      getVelocityRelativeToAir in interface SableCompanion
      Parameters:
      level - the level to check
      pos - the position of the point
      Returns:
      the global velocity of the point stored in dest [m/s]
    • isInPlotGrid

      public boolean isInPlotGrid(net.minecraft.world.level.Level level, int chunkX, int chunkZ)
      Description copied from interface: SableCompanion
      Checks if the plot grid contains the given chunk.
      Specified by:
      isInPlotGrid in interface SableCompanion
      Parameters:
      level - the level to check
      chunkX - the global chunk X position
      chunkZ - the global chunk Z position
      Returns:
      If the chunk is inside the plot-grid
    • getTrackingSubLevel

      @Nullable public @Nullable SubLevelAccess getTrackingSubLevel(net.minecraft.world.entity.Entity entity)
      Description copied from interface: SableCompanion
      Queries the sub-level an entity is currently "tracking", if any. Entities move with their tracking sub-levels, are networked in the local frame of them, and log out with tracking points located in them.
      Specified by:
      getTrackingSubLevel in interface SableCompanion
      Parameters:
      entity - the entity to query the tracking sub-level of
      Returns:
      the sub-level that the entity is tracking, if any
    • getLastTrackingSubLevel

      @Nullable public @Nullable SubLevelAccess getLastTrackingSubLevel(net.minecraft.world.entity.Entity entity)
      Description copied from interface: SableCompanion
      Queries the sub-level an entity is "tracking" last tick, if any. Entities move with their tracking sub-levels, are networked in the local frame of them, and log out with tracking points located in them.
      Specified by:
      getLastTrackingSubLevel in interface SableCompanion
      Parameters:
      entity - the entity to query the tracking sub-level of
      Returns:
      the sub-level that the entity is tracking, if any
    • getTrackingOrVehicleSubLevel

      @Nullable public @Nullable SubLevelAccess getTrackingOrVehicleSubLevel(net.minecraft.world.entity.Entity entity)
      Description copied from interface: SableCompanion
      Queries the sub-level an entity is currently tracking, or the vehicle sub-level.
      Specified by:
      getTrackingOrVehicleSubLevel in interface SableCompanion
      Parameters:
      entity - the entity to query
      Returns:
      the sub-level that the entity is tracking or the passenger of, if any
    • getVehicleSubLevel

      @Nullable public @Nullable SubLevelAccess getVehicleSubLevel(net.minecraft.world.entity.Entity entity)
      Specified by:
      getVehicleSubLevel in interface SableCompanion
      Parameters:
      entity - the entity to query
      Returns:
      the sub-level that the entity is passenger of, if any
    • getEyePositionInterpolated

      public net.minecraft.world.phys.Vec3 getEyePositionInterpolated(net.minecraft.world.entity.Entity entity, float partialTicks)
      Description copied from interface: SableCompanion
      Gets the interpolated eye position of an entity, taking their tracking sub-level into account.
      Specified by:
      getEyePositionInterpolated in interface SableCompanion
    • getFeetPos

      @NotNull public @NotNull org.joml.Vector3d getFeetPos(net.minecraft.world.entity.Entity entity, float distanceDown)
      Description copied from interface: SableCompanion
      Gets the feet position of an entity, taking their tracking sub-level into account.
      Specified by:
      getFeetPos in interface SableCompanion
      Parameters:
      entity - The entity to query
      distanceDown - The offset below the entity
    • getClientLevel

      public net.minecraft.world.level.Level getClientLevel()
      Specified by:
      getClientLevel in interface SableCompanion
      Returns:
      The client level instance for #getContainingClient instances