block lookup alignment
Some checks reported errors
studiorailgun/Renderer/pipeline/head Something is wrong with the build of this commit

This commit is contained in:
austin 2025-04-26 16:57:28 -04:00
parent e64c23f7f8
commit 52454e753c
2 changed files with 2 additions and 1 deletions

View File

@ -1550,6 +1550,7 @@ Interaction target tooltip at top of window
Interaction target tooltip shows entity target, voxel targets
Fix bug where inventory items aren't destroying physics on server
Align voxel lookups for movement audio and interaction targeting
Align block lookups for interaction targeting

View File

@ -269,7 +269,7 @@ public class ClientInteractionEngine {
//grab block at point
BlockChunkData blockChunkData = Globals.clientBlockManager.getChunkDataAtWorldPoint(Globals.clientWorldData.convertRealToWorldSpace(collisionPosition), 0);
if(blockChunkData != null){
Vector3i blockPos = Globals.clientWorldData.convertRealToBlockSpace(collisionPosition);
Vector3i blockPos = Globals.clientWorldData.convertRealToBlockSpace(new Vector3d(collisionPosition).add(new Vector3d(eyePos).mul(-BlockChunkData.BLOCK_SIZE_MULTIPLIER / 2.0f)));
if(!blockChunkData.isEmpty(blockPos.x, blockPos.y, blockPos.z)){
short type = blockChunkData.getType(blockPos.x, blockPos.y, blockPos.z);
String text = Globals.gameConfigCurrent.getBlockData().getTypeFromId(type).getName();