Interface SableCompanion

All Known Implementing Classes:
DefaultSableCompanion

public interface SableCompanion
Since:
1.0.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static @interface 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final SableCompanion
    The companion instance.
  • 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.
    default <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)
    getAllIntersecting(net.minecraft.world.level.Level level, BoundingBox3dc bounds)
    Gets all sublevels that intersect with the given bounding box
    net.minecraft.world.level.Level
     
    default @Nullable SubLevelAccess
    getContaining(net.minecraft.world.entity.Entity entity)
    Gets the sub-level that contains the given entity in its plot, or null if none do
    default @Nullable SubLevelAccess
    getContaining(net.minecraft.world.level.block.entity.BlockEntity blockEntity)
    Gets the sub-level that contains the given block-entity in its plot, or null if none do
    default @Nullable SubLevelAccess
    getContaining(net.minecraft.world.level.Level level, double blockX, double blockZ)
    Gets the sub-level that contains the given point in its plot, or null if none do
    @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
    default @Nullable SubLevelAccess
    getContaining(net.minecraft.world.level.Level level, net.minecraft.core.Position pos)
    Gets the sub-level that contains the given point in its plot, or null if none do
    default @Nullable SubLevelAccess
    getContaining(net.minecraft.world.level.Level level, net.minecraft.core.Vec3i pos)
    Gets the sub-level that contains the given point in its plot, or null if none do
    default @Nullable SubLevelAccess
    getContaining(net.minecraft.world.level.Level level, net.minecraft.world.level.ChunkPos chunkPos)
    Gets the sub-level that contains the given point in its plot, or null if none do
    default @Nullable SubLevelAccess
    getContaining(net.minecraft.world.level.Level level, org.joml.Vector3dc pos)
    Gets the sub-level that contains the given point in its plot, or null if none do
    default @Nullable ClientSubLevelAccess
    getContainingClient(double blockX, double blockZ)
    Gets the sub-level that contains the given point in its plot, or null if none do
    default @Nullable ClientSubLevelAccess
    getContainingClient(int chunkX, int chunkZ)
    Gets the sub-level that contains the given point in its plot, or null if none do in the client level
    default @Nullable ClientSubLevelAccess
    getContainingClient(net.minecraft.core.Position pos)
    Gets the sub-level that contains the given point in its plot, or null if none do in the client level
    default @Nullable ClientSubLevelAccess
    getContainingClient(net.minecraft.core.Vec3i pos)
    Gets the sub-level that contains the given point in its plot, or null if none do in the client level
    default @Nullable ClientSubLevelAccess
    getContainingClient(net.minecraft.world.entity.Entity entity)
    Gets the sub-level that contains the given entity in its plot, or null if none do
    default @Nullable ClientSubLevelAccess
    getContainingClient(net.minecraft.world.level.block.entity.BlockEntity blockEntity)
    Gets the sub-level that contains the given block-entity in its plot, or null if none do
    default @Nullable ClientSubLevelAccess
    getContainingClient(net.minecraft.world.level.ChunkPos chunkPos)
    Gets the sub-level that contains the given point in its plot, or null if none do in the client level
    default @Nullable ClientSubLevelAccess
    getContainingClient(org.joml.Vector3dc pos)
    Gets the sub-level that contains the given point in its plot, or null if none do in the client level
    default 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)
    default org.joml.Vector3d
    getVelocity(net.minecraft.world.level.Level level, SubLevelAccess subLevel, org.joml.Vector3d 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
    default 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)
    Deprecated.
    default org.joml.Vector3d
    getVelocity(net.minecraft.world.level.Level level, org.joml.Vector3d 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.
    default 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)
    default org.joml.Vector3d
    getVelocityRelativeToAir(net.minecraft.world.level.Level level, org.joml.Vector3d 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
    default boolean
    isInPlotGrid(net.minecraft.world.entity.Entity entity)
    Checks if the plot grid contains the given entity.
    default boolean
    isInPlotGrid(net.minecraft.world.level.block.entity.BlockEntity blockEntity)
    Checks if the plot grid contains the given block entity.
    boolean
    isInPlotGrid(net.minecraft.world.level.Level level, int chunkX, int chunkZ)
    Checks if the plot grid contains the given chunk.
    default boolean
    isInPlotGrid(net.minecraft.world.level.Level level, net.minecraft.core.Position pos)
    Checks if the plot grid contains the given point.
    default boolean
    isInPlotGrid(net.minecraft.world.level.Level level, net.minecraft.core.Vec3i pos)
    Checks if the plot grid contains the given block.
    default boolean
    isInPlotGrid(net.minecraft.world.level.Level level, net.minecraft.world.level.ChunkPos chunkPos)
    Checks if the plot grid contains the given chunk.
    default boolean
    isInPlotGrid(net.minecraft.world.level.Level level, org.joml.Vector3dc pos)
    Checks if the plot grid contains the given point.
    default 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)
    Deprecated.
    default org.joml.Vector3d
    projectOutOfSubLevel(net.minecraft.world.level.Level level, org.joml.Vector3d 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
    default <T, S extends SubLevelAccess>
    T
    runIncludingSubLevels(net.minecraft.world.level.Level level, net.minecraft.core.Position origin, boolean shouldCheckOrigin, S subLevel, BiFunction<@Nullable 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<@Nullable S,net.minecraft.core.BlockPos,T> converter)
  • Field Details

    • INSTANCE

      static final SableCompanion INSTANCE
      The companion instance.
  • Method Details

    • getAllIntersecting

      @Contract(pure=true) Iterable<? extends SubLevelAccess> getAllIntersecting(net.minecraft.world.level.Level level, BoundingBox3dc bounds)
      Gets all sublevels that intersect with the given bounding box
      Parameters:
      bounds - The bounding box to check.
      NOTE: the bounds must NOT be modified during the iteration. this will cause undefined behavior!
    • getContaining

      @Contract(pure=true) @Nullable @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
      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
    • getContaining

      @Contract(pure=true) @Nullable default @Nullable SubLevelAccess getContaining(net.minecraft.world.level.Level level, net.minecraft.world.level.ChunkPos chunkPos)
      Gets the sub-level that contains the given point in its plot, or null if none do
      Parameters:
      level - the level to check
      chunkPos - the global chunk position to check
      Returns:
      the sub-level that contains the point, or null if none do
    • getContaining

      @Contract(pure=true) @Nullable default @Nullable SubLevelAccess getContaining(net.minecraft.world.level.Level level, net.minecraft.core.Vec3i pos)
      Gets the sub-level that contains the given point in its plot, or null if none do
      Parameters:
      level - the level to check
      pos - the global block position to check
      Returns:
      the sub-level that contains the point, or null if none do
    • getContaining

      @Contract(pure=true) @Nullable default @Nullable SubLevelAccess getContaining(net.minecraft.world.level.Level level, net.minecraft.core.Position pos)
      Gets the sub-level that contains the given point in its plot, or null if none do
      Parameters:
      level - the level to check
      pos - the global position to check
      Returns:
      the sub-level that contains the point, or null if none do
    • getContaining

      @Contract(pure=true) @Nullable default @Nullable SubLevelAccess getContaining(net.minecraft.world.level.Level level, org.joml.Vector3dc pos)
      Gets the sub-level that contains the given point in its plot, or null if none do
      Parameters:
      level - the level to check
      pos - the global position to check
      Returns:
      the sub-level that contains the point, or null if none do
    • getContaining

      @Contract(pure=true) @Nullable default @Nullable SubLevelAccess getContaining(net.minecraft.world.level.Level level, double blockX, double blockZ)
      Gets the sub-level that contains the given point in its plot, or null if none do
      Parameters:
      level - the level to check
      blockX - the global X position to check
      blockZ - the global Z position to check
      Returns:
      the sub-level that contains the point, or null if none do
      Since:
      1.2.0
    • getContaining

      @Contract(pure=true) @Nullable default @Nullable SubLevelAccess getContaining(net.minecraft.world.entity.Entity entity)
      Gets the sub-level that contains the given entity in its plot, or null if none do
      Parameters:
      entity - the entity to check
      Returns:
      the sub-level that contains the point, or null if none do
    • getContaining

      @Contract(pure=true) @Nullable default @Nullable SubLevelAccess getContaining(net.minecraft.world.level.block.entity.BlockEntity blockEntity)
      Gets the sub-level that contains the given block-entity in its plot, or null if none do
      Parameters:
      blockEntity - the block-entity to check
      Returns:
      the sub-level that contains the point, or null if none do
    • getContainingClient

      @Contract(pure=true) @Nullable default @Nullable ClientSubLevelAccess getContainingClient(int chunkX, int chunkZ)
      Gets the sub-level that contains the given point in its plot, or null if none do in the client level
      Parameters:
      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
      Since:
      1.2.0
    • getContainingClient

      @Contract(pure=true) @Nullable default @Nullable ClientSubLevelAccess getContainingClient(net.minecraft.world.level.ChunkPos chunkPos)
      Gets the sub-level that contains the given point in its plot, or null if none do in the client level
      Parameters:
      chunkPos - the global chunk position to check
      Returns:
      the sub-level that contains the point, or null if none do
      Since:
      1.2.0
    • getContainingClient

      @Contract(pure=true) @Nullable default @Nullable ClientSubLevelAccess getContainingClient(net.minecraft.core.Position pos)
      Gets the sub-level that contains the given point in its plot, or null if none do in the client level
      Parameters:
      pos - the global position to check
      Returns:
      the sub-level that contains the point, or null if none do
    • getContainingClient

      @Contract(pure=true) @Nullable default @Nullable ClientSubLevelAccess getContainingClient(org.joml.Vector3dc pos)
      Gets the sub-level that contains the given point in its plot, or null if none do in the client level
      Parameters:
      pos - the global position to check
      Returns:
      the sub-level that contains the point, or null if none do
    • getContainingClient

      @Contract(pure=true) @Nullable default @Nullable ClientSubLevelAccess getContainingClient(net.minecraft.core.Vec3i pos)
      Gets the sub-level that contains the given point in its plot, or null if none do in the client level
      Parameters:
      pos - the global position to check
      Returns:
      the sub-level that contains the point, or null if none do
    • getContainingClient

      @Contract(pure=true) @Nullable default @Nullable ClientSubLevelAccess getContainingClient(double blockX, double blockZ)
      Gets the sub-level that contains the given point in its plot, or null if none do
      Parameters:
      blockX - the global X position to check
      blockZ - the global Z position to check
      Returns:
      the sub-level that contains the point, or null if none do
      Since:
      1.2.0
    • getContainingClient

      @Contract(pure=true) @Nullable default @Nullable ClientSubLevelAccess getContainingClient(net.minecraft.world.entity.Entity entity)
      Gets the sub-level that contains the given entity in its plot, or null if none do
      Parameters:
      entity - the entity to check
      Returns:
      the sub-level that contains the point, or null if none do
      Since:
      1.2.0
    • getContainingClient

      @Contract(pure=true) @Nullable default @Nullable ClientSubLevelAccess getContainingClient(net.minecraft.world.level.block.entity.BlockEntity blockEntity)
      Gets the sub-level that contains the given block-entity in its plot, or null if none do
      Parameters:
      blockEntity - the block-entity to check
      Returns:
      the sub-level that contains the point, or null if none do
      Since:
      1.2.0
    • projectOutOfSubLevel

      @Contract(value="_,_->param2", mutates="param2") default org.joml.Vector3d projectOutOfSubLevel(net.minecraft.world.level.Level level, org.joml.Vector3d pos)
      Projects a point out of a sublevel, if it is within one
      Parameters:
      level - the level to check
      pos - the point to project
      Returns:
      the projected point
      Since:
      1.2.0
    • projectOutOfSubLevel

      @Contract(value="_,_,_->param3", mutates="param3") 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
      Parameters:
      level - the level to check
      pos - the point to project
      Returns:
      the projected point
    • projectOutOfSubLevel

      @ScheduledForRemoval(inVersion="2.0.0") @Deprecated @Contract(value="_,_->new", pure=true) net.minecraft.world.phys.Vec3 projectOutOfSubLevel(net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 pos)
      Deprecated.
      Projects a point out of a sublevel, if it is within one
      Parameters:
      level - the level to check
      pos - the point to project
      Returns:
      the projected point
    • projectOutOfSubLevel

      @Contract(value="_,_->new", pure=true) default 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
      Parameters:
      level - the level to check
      pos - the point to project
      Returns:
      the projected point
      Since:
      1.2.0
    • runIncludingSubLevels

      @ScheduledForRemoval(inVersion="2.0.0") @Deprecated @Nullable @Contract(pure=true) <T, S extends SubLevelAccess> T runIncludingSubLevels(net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 origin, boolean shouldCheckOrigin, @Nullable S subLevel, BiFunction<@Nullable 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. Priority: World -> World, Sub-level -> World, World -> Sub-level
      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 @Contract(pure=true) default <T, S extends SubLevelAccess> T runIncludingSubLevels(net.minecraft.world.level.Level level, net.minecraft.core.Position origin, boolean shouldCheckOrigin, @Nullable S subLevel, BiFunction<@Nullable 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. Priority: World -> World, Sub-level -> World, World -> Sub-level
      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
      Since:
      1.2.0
    • findIncludingSubLevels

      @ScheduledForRemoval(inVersion="2.0.0") @Deprecated @Contract(pure=true) <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)
      Checks positions in a level, including sublevels, for a true value from the converter. Priority: World -> World, Sub-level -> World, World -> Sub-level
      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

      @Contract(pure=true) default <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)
      Checks positions in a level, including sublevels, for a true value from the converter. Priority: World -> World, Sub-level -> World, World -> Sub-level
      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
      Since:
      1.2.0
    • distanceSquaredWithSubLevels

      @Contract(pure=true) 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.
      Parameters:
      level - the level to check
      a - the first point
      b - the second point
      Returns:
      the distance squared between the two points
    • distanceSquaredWithSubLevels

      @Contract(pure=true) 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.
      Parameters:
      level - the level to check
      a - the first point
      b - the second point
      Returns:
      the distance squared between the two points
    • distanceSquaredWithSubLevels

      @Contract(pure=true) 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.
      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
      Since:
      1.2.0
    • distanceSquaredWithSubLevels

      @Contract(pure=true) 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.
      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
      Since:
      1.2.0
    • distanceSquaredWithSubLevels

      @Contract(pure=true) 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.
      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
      Since:
      1.2.0
    • getVelocity

      @Contract(value="_,_,_->param3", mutates="param3") 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.
      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

      @Contract(value="_,_->param2", mutates="param2") default org.joml.Vector3d getVelocity(net.minecraft.world.level.Level level, org.joml.Vector3d pos)
      Gets the global velocity of a point in a level, taking into account sub-level movement.
      Parameters:
      level - the level to check
      pos - the position of the point
      Returns:
      the global velocity of the point stored in dest [m/s]
      Since:
      1.3.0
    • getVelocity

      @ScheduledForRemoval(inVersion="2.0.0") @Deprecated @Contract(value="_,_->new", pure=true) net.minecraft.world.phys.Vec3 getVelocity(net.minecraft.world.level.Level level, net.minecraft.world.phys.Vec3 pos)
      Deprecated.
      Gets the global velocity of a point in a level, taking into account sub-level movement.
      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

      @Contract(value="_,_->new", pure=true) default 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.
      Parameters:
      level - the level to check
      pos - the position of the point
      Returns:
      the global velocity of the point stored in dest [m/s]
      Since:
      1.2.0
    • getVelocity

      @Contract(value="_,_,_,_->param4", mutates="param4") 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
      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

      @Contract(value="_,_,_->param3", mutates="param3") default org.joml.Vector3d getVelocity(net.minecraft.world.level.Level level, SubLevelAccess subLevel, org.joml.Vector3d pos)
      Gets the global velocity of a point in a sub-level
      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]
      Since:
      1.3.0
    • getVelocity

      @ScheduledForRemoval(inVersion="2.0.0") @Deprecated @Contract(value="_,_,_->new", pure=true) 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
      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

      @Contract(value="_,_,_->new", pure=true) default 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
      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]
      Since:
      1.2.0
    • getVelocityRelativeToAir

      @Contract(value="_,_,_->param3", mutates="param3") 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
      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

      @Contract(value="_,_->param2", mutates="param2") default org.joml.Vector3d getVelocityRelativeToAir(net.minecraft.world.level.Level level, org.joml.Vector3d pos)
      Gets the global velocity of a point in a level relative to the air, taking into account sublevels and their plots/poses
      Parameters:
      level - the level to check
      pos - the position of the point
      Returns:
      the global velocity of the point stored in dest [m/s]
      Since:
      1.3.0
    • getVelocityRelativeToAir

      @ScheduledForRemoval(inVersion="2.0.0") @Deprecated @Contract(pure=true) 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
      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

      @Contract(pure=true) default 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
      Parameters:
      level - the level to check
      pos - the position of the point
      Returns:
      the global velocity of the point stored in dest [m/s]
      Since:
      1.2.0
    • isInPlotGrid

      @Contract(pure=true) boolean isInPlotGrid(net.minecraft.world.level.Level level, int chunkX, int chunkZ)
      Checks if the plot grid contains the given chunk.
      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
    • isInPlotGrid

      @Contract(pure=true) default boolean isInPlotGrid(net.minecraft.world.level.Level level, net.minecraft.world.level.ChunkPos chunkPos)
      Checks if the plot grid contains the given chunk.
      Parameters:
      level - the level to check
      chunkPos - the global chunk position
      Returns:
      If the chunk is inside the plot-grid
    • isInPlotGrid

      @Contract(pure=true) default boolean isInPlotGrid(net.minecraft.world.level.Level level, net.minecraft.core.Vec3i pos)
      Checks if the plot grid contains the given block.
      Parameters:
      level - the level to check
      pos - the global position to check
      Returns:
      If the block is inside the plot-grid
    • isInPlotGrid

      @Contract(pure=true) default boolean isInPlotGrid(net.minecraft.world.level.Level level, net.minecraft.core.Position pos)
      Checks if the plot grid contains the given point.
      Parameters:
      level - the level to check
      pos - the global position to check
      Returns:
      If the point is inside the plot-grid
    • isInPlotGrid

      @Contract(pure=true) default boolean isInPlotGrid(net.minecraft.world.level.Level level, org.joml.Vector3dc pos)
      Checks if the plot grid contains the given point.
      Parameters:
      level - the level to check
      pos - the global position to check
      Returns:
      If the point is inside the plot-grid
    • isInPlotGrid

      @Contract(pure=true) default boolean isInPlotGrid(net.minecraft.world.entity.Entity entity)
      Checks if the plot grid contains the given entity.
      Parameters:
      entity - The entity to check
      Returns:
      If the entity is inside the plot-grid
    • isInPlotGrid

      @Contract(pure=true) default boolean isInPlotGrid(net.minecraft.world.level.block.entity.BlockEntity blockEntity)
      Checks if the plot grid contains the given block entity.
      Parameters:
      blockEntity - The block entity to check
      Returns:
      If the block entity is inside the plot-grid
    • getClientLevel

      @OverrideOnly net.minecraft.world.level.Level getClientLevel()
      Returns:
      The client level instance for #getContainingClient instances