mirror of
https://github.com/filoghost/HolographicDisplays.git
synced 2024-10-07 03:57:39 +02:00
Fix touch position on items being offset
This commit is contained in:
parent
f358483d23
commit
ba6d18306e
@ -69,8 +69,8 @@ public class CraftItemLine extends CraftTouchableLine implements ItemLine {
|
||||
|
||||
@Override
|
||||
public void setTouchHandler(TouchHandler touchHandler) {
|
||||
if (nmsItem != null) {
|
||||
Location loc = nmsItem.getBukkitEntityNMS().getLocation();
|
||||
if (nmsVehicle != null) {
|
||||
Location loc = nmsVehicle.getBukkitEntityNMS().getLocation();
|
||||
super.setTouchHandler(touchHandler, loc.getWorld(), loc.getX(), loc.getY() - getItemOffset(), loc.getZ());
|
||||
} else {
|
||||
super.setTouchHandler(touchHandler, null, 0, 0, 0);
|
||||
|
@ -86,12 +86,9 @@ public class CraftTextLine extends CraftTouchableLine implements TextLine {
|
||||
|
||||
@Override
|
||||
public void setTouchHandler(TouchHandler touchHandler) {
|
||||
|
||||
if (nmsNameble != null) {
|
||||
|
||||
Location loc = nmsNameble.getBukkitEntityNMS().getLocation();
|
||||
super.setTouchHandler(touchHandler, loc.getWorld(), loc.getX(), loc.getY() - getTextOffset(), loc.getZ());
|
||||
|
||||
} else {
|
||||
super.setTouchHandler(touchHandler, null, 0, 0, 0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user