Skip to content

Commit

Permalink
fix hologram height issue for 1.20.3
Browse files Browse the repository at this point in the history
  • Loading branch information
hakan-krgn committed Dec 28, 2023
1 parent 1beb580 commit 4026048
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public void setLocation(@Nonnull Location location) {

this.world = ((CraftWorld) Validate.notNull(location.getWorld())).getHandle();
if (!this.world.equals(this.armorStand.dM())) ReflectionUtils.setField(this.armorStand, "t", this.world);
this.armorStand.a(location.getX(), location.getY() - 0.48, location.getZ(), location.getYaw(), location.getPitch());
this.armorStand.a(location.getX(), location.getY() - 1.4675, location.getZ(), location.getYaw(), location.getPitch());

HCore.sendPacket(this.hologram.getRenderer().getShownPlayers(),
new PacketPlayOutEntityTeleport(this.armorStand));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ public void setLocation(@Nonnull Location location) {
World world = ((CraftWorld) Validate.notNull(location.getWorld())).getHandle();
if (!world.equals(this.click.dM())) ReflectionUtils.setField(this.click, "t", world);
if (!world.equals(this.armorStand.dM())) ReflectionUtils.setField(this.armorStand, "t", world);
this.click.a(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
this.armorStand.a(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
this.click.a(location.getX(), location.getY() - 0.9875, location.getZ(), location.getYaw(), location.getPitch());
this.armorStand.a(location.getX(), location.getY() - 0.9875, location.getZ(), location.getYaw(), location.getPitch());

HCore.sendPacket(this.hologram.getRenderer().getShownPlayers(),
new PacketPlayOutEntityTeleport(this.armorStand),
Expand Down

0 comments on commit 4026048

Please sign in to comment.