From e9d7836f9a718306ccbabddb92ed7d9dd53daf43 Mon Sep 17 00:00:00 2001 From: MoBrot <90271578+MoBrot@users.noreply.github.com> Date: Tue, 28 Jun 2022 21:34:00 +0200 Subject: [PATCH] Fix EntitySound on WarpEntity destroy --- .../src/de/steamwar/bausystem/entities/WarpEntity19.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/BauSystem_19/src/de/steamwar/bausystem/entities/WarpEntity19.java b/BauSystem_19/src/de/steamwar/bausystem/entities/WarpEntity19.java index 1cb23ccb..877dcbe0 100644 --- a/BauSystem_19/src/de/steamwar/bausystem/entities/WarpEntity19.java +++ b/BauSystem_19/src/de/steamwar/bausystem/entities/WarpEntity19.java @@ -23,7 +23,9 @@ import de.steamwar.bausystem.features.warp.AbstractWarpEntity; import de.steamwar.bausystem.shared.BaseArmorStand19; import net.minecraft.network.chat.IChatMutableComponent; import net.minecraft.network.chat.contents.LiteralContents; +import net.minecraft.network.protocol.game.PacketPlayOutEntityTeleport; import org.bukkit.World; +import org.bukkit.craftbukkit.v1_19_R1.entity.CraftPlayer; import org.bukkit.entity.Player; import org.bukkit.util.Vector; @@ -54,6 +56,13 @@ public class WarpEntity19 extends BaseArmorStand19 implements AbstractWarpEntity @Override public boolean hide(Player player) { + + this.position.setY(this.position.getY() - 1000); + this.e(this.position.getX(), this.position.getY(), this.position.getZ()); + + PacketPlayOutEntityTeleport entityTeleport = new PacketPlayOutEntityTeleport(this); + ((CraftPlayer) player).getHandle().b.a(entityTeleport); + sendEntityDestroy(player); ag(); return true;