block lookup alignment
Some checks reported errors
studiorailgun/Renderer/pipeline/head Something is wrong with the build of this commit
Some checks reported errors
studiorailgun/Renderer/pipeline/head Something is wrong with the build of this commit
This commit is contained in:
parent
e64c23f7f8
commit
52454e753c
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user