@@ -0,0 +1,1074 @@
+package ethanjones.modularworld.graphics.world;%0A%0Aimport com.badlogic.gdx.math.Vector3;%0Aimport ethanjones.modularworld.side.client.ModularWorldClient;%0Aimport ethanjones.modularworld.world.World;%0Aimport ethanjones.modularworld.world.reference.BlockReference;%0A%0Apublic class RayTracing %7B%0A%0A  public static BlockReference getBlock() %7B%0A    Vector3 block = getBlock(ModularWorldClient.instance.player.position, ModularWorldClient.instance.renderer.block.camera.direction, ModularWorldClient.instance.world, 8);%0A    if (block == null) return null;%0A    return new BlockReference().set((int) Math.floor(block.x), (int) Math.floor(block.y), (int) Math.floor(block.z));%0A  %7D%0A%0A  public static Vector3 getBlock(Vector3 starting, Vector3 direction, World world, int maxDistance) %7B%0A    Vector3 v = direction.cpy().nor();%0A    Vector3 pos = starting.cpy();%0A    for (int i = 0; i %3C maxDistance; i++) %7B%0A      if (world.getBlockFactory((int) Math.floor(pos.x), (int) Math.floor(pos.y), (int) Math.floor(pos.z)) != null) %7B%0A        return pos;%0A      %7D%0A      pos.add(v);%0A    %7D%0A    return null;%0A  %7D%0A%7D%0A

Add raytracing