implement hitbox

This commit is contained in:
LabyStudio
2022-02-13 05:30:18 +01:00
parent 6e46e5e838
commit 82ea74085b
5 changed files with 98 additions and 7 deletions
+2 -2
View File
@@ -341,7 +341,7 @@ window.World = class {
let block = Block.getById(blockId);
if (block != null && block.canInteract()) {
let hit = block.collisionRayTrace(x, y, z, from, to);
let hit = block.collisionRayTrace(this, x, y, z, from, to);
if (hit != null) {
return hit;
}
@@ -435,7 +435,7 @@ window.World = class {
let block = Block.getById(blockId);
if (block != null && block.canInteract()) {
let hit = block.collisionRayTrace(x, y, z, from, to);
let hit = block.collisionRayTrace(this, x, y, z, from, to);
if (hit != null) {
return hit;
}