Class WorldUtils

java.lang.Object
org.rusherhack.client.api.utils.WorldUtils
All Implemented Interfaces:
Globals

public class WorldUtils extends Object implements Globals
  • Field Summary

    Fields inherited from interface org.rusherhack.client.api.Globals

    mc
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    checkCollision(net.minecraft.core.BlockPos pos)
     
    static boolean
    checkCollision(net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.VoxelShape shape, Predicate<net.minecraft.world.entity.Entity> predicate)
     
    static List<net.minecraft.world.level.block.entity.BlockEntity>
    getBlockEntities(boolean sorted)
     
    static List<net.minecraft.world.level.chunk.LevelChunk>
     
    static List<net.minecraft.core.BlockPos>
    getCircle(net.minecraft.core.Vec3i center, float circleRadius)
     
    static List<net.minecraft.world.entity.Entity>
     
    static List<net.minecraft.world.entity.Entity>
    getEntities(Predicate<net.minecraft.world.entity.Entity> predicate)
     
    static List<net.minecraft.world.entity.Entity>
     
    static List<net.minecraft.world.entity.Entity>
    getEntitiesSorted(net.minecraft.world.entity.Entity entity)
     
    static List<net.minecraft.world.entity.Entity>
    getEntitiesSorted(net.minecraft.world.entity.Entity entity, Predicate<net.minecraft.world.entity.Entity> predicate)
     
    static List<net.minecraft.core.BlockPos>
    getSphere(net.minecraft.core.Vec3i center, float sphereRadius)
     
    static List<net.minecraft.core.BlockPos>
    getSphere(net.minecraft.core.Vec3i center, float sphereRadius, Predicate<net.minecraft.core.BlockPos> predicate)
     
    static boolean
    isReplaceble(net.minecraft.core.BlockPos pos)
     

    Methods inherited from class java.lang.Object

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

    • WorldUtils

      public WorldUtils()
  • Method Details

    • getEntities

      public static List<net.minecraft.world.entity.Entity> getEntities()
      Returns:
      all loaded entities
    • getEntities

      public static List<net.minecraft.world.entity.Entity> getEntities(Predicate<net.minecraft.world.entity.Entity> predicate)
      Returns:
      all loaded entities
    • getEntitiesSorted

      public static List<net.minecraft.world.entity.Entity> getEntitiesSorted()
      Returns:
      all loaded entities sorted by distance to camera
    • getEntitiesSorted

      public static List<net.minecraft.world.entity.Entity> getEntitiesSorted(net.minecraft.world.entity.Entity entity)
      Returns:
      all loaded entities sorted by distance to entity
    • getEntitiesSorted

      public static List<net.minecraft.world.entity.Entity> getEntitiesSorted(net.minecraft.world.entity.Entity entity, Predicate<net.minecraft.world.entity.Entity> predicate)
      Returns:
      all loaded entities sorted by distance to entity
    • getChunks

      public static List<net.minecraft.world.level.chunk.LevelChunk> getChunks()
    • getBlockEntities

      public static List<net.minecraft.world.level.block.entity.BlockEntity> getBlockEntities(boolean sorted)
    • getSphere

      public static List<net.minecraft.core.BlockPos> getSphere(net.minecraft.core.Vec3i center, float sphereRadius)
      Returns:
      a sphere of block positions
    • getSphere

      public static List<net.minecraft.core.BlockPos> getSphere(net.minecraft.core.Vec3i center, float sphereRadius, Predicate<net.minecraft.core.BlockPos> predicate)
      Parameters:
      predicate - a predicate for which all positions will be tested against
      Returns:
      a sphere of block positions
    • getCircle

      public static List<net.minecraft.core.BlockPos> getCircle(net.minecraft.core.Vec3i center, float circleRadius)
      Returns:
      a circle of block positions
    • isReplaceble

      public static boolean isReplaceble(net.minecraft.core.BlockPos pos)
      Returns:
      true if the position is air or contains a replaceable block
    • checkCollision

      public static boolean checkCollision(net.minecraft.core.BlockPos pos)
      Returns:
      true if the position is free of entities that would prevent placing
    • checkCollision

      public static boolean checkCollision(net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.VoxelShape shape, Predicate<net.minecraft.world.entity.Entity> predicate)
      Parameters:
      shape - the shape in which we are checking for collision
      predicate - a predicate for which all entities will be tested against
      Returns:
      true if the position is free of entities that would prevent placing