mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-03 05:51:42 +01:00
Move display holograms around
This commit is contained in:
parent
224b43d75b
commit
f9e78c732d
@ -784,8 +784,10 @@ public class HologramTrait extends Trait {
|
|||||||
if (color != null) {
|
if (color != null) {
|
||||||
disp.setBackgroundColor(color);
|
disp.setBackgroundColor(color);
|
||||||
}
|
}
|
||||||
hologram.getEntity().teleport(npc.getStoredLocation().clone().add(offset.x,
|
hologram.getEntity().teleport(
|
||||||
offset.y + NMS.getBoundingBoxHeight(npc.getEntity()), offset.z), TeleportCause.PLUGIN);
|
npc.getStoredLocation().clone().add(offset.x,
|
||||||
|
offset.y + NMS.getBoundingBoxHeight(npc.getEntity()) + 0.2f, offset.z),
|
||||||
|
TeleportCause.PLUGIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBackgroundColor(Color color) {
|
public void setBackgroundColor(Color color) {
|
||||||
@ -819,7 +821,7 @@ public class HologramTrait extends Trait {
|
|||||||
disp.setInterpolationDuration(0);
|
disp.setInterpolationDuration(0);
|
||||||
disp.setBillboard(Billboard.CENTER);
|
disp.setBillboard(Billboard.CENTER);
|
||||||
Transformation tf = disp.getTransformation();
|
Transformation tf = disp.getTransformation();
|
||||||
tf.getTranslation().y = (float) offset.y + 0.7f;
|
tf.getTranslation().y = (float) offset.y + 0.4f;
|
||||||
disp.setTransformation(tf);
|
disp.setTransformation(tf);
|
||||||
if (color != null) {
|
if (color != null) {
|
||||||
disp.setBackgroundColor(color);
|
disp.setBackgroundColor(color);
|
||||||
|
Loading…
Reference in New Issue
Block a user