mirror of
https://github.com/Oth3r/Sit.git
synced 2025-09-20 00:13:21 +02:00
real fix for #17
This commit is contained in:
parent
0a093bebc0
commit
ebe2f66ff2
1 changed files with 2 additions and 2 deletions
|
@ -226,9 +226,9 @@ public class Utl {
|
||||||
public static BlockPos getBlockPos(DisplayEntity.TextDisplayEntity entity) {
|
public static BlockPos getBlockPos(DisplayEntity.TextDisplayEntity entity) {
|
||||||
// the entity Y level, adjusted
|
// the entity Y level, adjusted
|
||||||
// the adjustment - is the opposite of the offset applied in Entity.create()
|
// the adjustment - is the opposite of the offset applied in Entity.create()
|
||||||
double entityY = entity.getBlockY() + (Y_ADJUSTMENT*-1);
|
int entityBlockY = (int) (Math.floor(entity.getY() + (Y_ADJUSTMENT*-1)));
|
||||||
// get the block pos
|
// get the block pos
|
||||||
BlockPos pos = new BlockPos(entity.getBlockX(),(int)entityY,entity.getBlockZ());
|
BlockPos pos = new BlockPos(entity.getBlockX(),entityBlockY,entity.getBlockZ());
|
||||||
// if above the block, subtract 1
|
// if above the block, subtract 1
|
||||||
if (isAboveBlockHeight(entity)) {
|
if (isAboveBlockHeight(entity)) {
|
||||||
pos = pos.add(0,-1,0);
|
pos = pos.add(0,-1,0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue