mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-22 18:45:29 +01:00
Re-mounting interaction entities seems to work
This commit is contained in:
parent
e889476e7b
commit
8efde00530
@ -38,6 +38,7 @@ import net.citizensnpcs.util.Util;
|
|||||||
/**
|
/**
|
||||||
* Persists a hologram attached to the NPC.
|
* Persists a hologram attached to the NPC.
|
||||||
*/
|
*/
|
||||||
|
// TODO: refactor this class and remove HologramDirection
|
||||||
@TraitName("hologramtrait")
|
@TraitName("hologramtrait")
|
||||||
public class HologramTrait extends Trait {
|
public class HologramTrait extends Trait {
|
||||||
private Location currentLoc;
|
private Location currentLoc;
|
||||||
@ -326,7 +327,7 @@ public class HologramTrait extends Trait {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (useDisplayEntities && nameLine.hologram.getEntity().getVehicle() == null) {
|
if (useDisplayEntities && nameLine.hologram.getEntity().getVehicle() == null) {
|
||||||
NMS.updateMountedInteractionHeight(nameLine.hologram.getEntity(), npc.getEntity(), 0);
|
npc.getEntity().addPassenger(nameLine.hologram.getEntity());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (updateName) {
|
if (updateName) {
|
||||||
@ -354,8 +355,7 @@ public class HologramTrait extends Trait {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (useDisplayEntities && hologramNPC.getEntity().getVehicle() == null) {
|
if (useDisplayEntities && hologramNPC.getEntity().getVehicle() == null) {
|
||||||
NMS.updateMountedInteractionHeight(hologramNPC.getEntity(), npc.getEntity(),
|
npc.getEntity().addPassenger(hologramNPC.getEntity());
|
||||||
(direction == HologramDirection.BOTTOM_UP ? getHeight(i) : getMaxHeight() - getHeight(i)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String text = line.text;
|
String text = line.text;
|
||||||
|
Loading…
Reference in New Issue
Block a user