From 9f82b416db73cd3564535c7ea3d71152d9e04bc4 Mon Sep 17 00:00:00 2001 From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Date: Sat, 20 Jan 2024 11:53:11 -0500 Subject: [PATCH] update to 1.20.4 --- build.gradle.kts | 2 +- src/main/java/com/owen1212055/customname/CustomName.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 686c468..fe844a8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,7 +14,7 @@ repositories { } dependencies { - paperweight.paperDevBundle("1.20-R0.1-SNAPSHOT") + paperweight.paperDevBundle("1.20.4-R0.1-SNAPSHOT") implementation("xyz.jpenilla", "reflection-remapper", "0.1.0-SNAPSHOT") } \ No newline at end of file diff --git a/src/main/java/com/owen1212055/customname/CustomName.java b/src/main/java/com/owen1212055/customname/CustomName.java index 77731cf..d051182 100644 --- a/src/main/java/com/owen1212055/customname/CustomName.java +++ b/src/main/java/com/owen1212055/customname/CustomName.java @@ -5,8 +5,8 @@ import net.minecraft.network.protocol.Packet; import net.minecraft.network.protocol.game.ClientGamePacketListener; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_20_R1.entity.CraftEntity; -import org.bukkit.craftbukkit.v1_20_R1.entity.CraftPlayer; +import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_20_R3.entity.CraftPlayer; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import org.bukkit.scheduler.BukkitRunnable; @@ -41,7 +41,7 @@ public class CustomName { this.targetEntity = entity; net.minecraft.world.entity.Entity nmsEntity = ((CraftEntity) entity).getHandle(); - double ridingOffset = nmsEntity.getPassengersRidingOffset(); + double ridingOffset = nmsEntity.getPassengerRidingPosition(null).subtract(nmsEntity.position()).y; double nametagOffset = nmsEntity.getNameTagOffsetY(); // First, negate the riding offset to get to the bounding of the entity's bounding box