partially functional raycasting

This commit is contained in:
James Seibel
2022-11-16 22:35:56 -06:00
parent d31013a680
commit 103a03c90f
4 changed files with 95 additions and 6 deletions
@@ -10,5 +10,6 @@ import com.seibel.lod.api.interfaces.IDhApiUnsafeWrapper;
*/
public interface IDhApiBlockStateWrapper extends IDhApiUnsafeWrapper
{
boolean isAir();
}
@@ -38,8 +38,13 @@ public interface IDhApiLevelWrapper extends IDhApiUnsafeWrapper
boolean hasSkyLight();
/** Returns the max block height of the level(?) */
int getHeight();
/**
* Returns the lowest possible block position for the level. <br>
* For MC versions before 1.19 this will return 0.
*/
default int getMinHeight() { return 0; }
}
@@ -147,6 +147,7 @@ public class Vec3f
return this.x * vector.x + this.y * vector.y + this.z * vector.z;
}
/** Returns true if normalization had to be done */
public boolean normalize()
{
float squaredSum = this.x * this.x + this.y * this.y + this.z * this.z;