From 0f8c2fa454f36b174e277030e16d5d11081ebe0d Mon Sep 17 00:00:00 2001 From: sciwhiz12 Date: Sun, 8 May 2022 05:12:21 +0000 Subject: [PATCH] Fire EntityTravelToDimensionEvent in all expected cases (#8614) Fixes #8520 --- patches/minecraft/net/minecraft/world/entity/Entity.java.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/patches/minecraft/net/minecraft/world/entity/Entity.java.patch b/patches/minecraft/net/minecraft/world/entity/Entity.java.patch index 79813b9233..63a389b039 100644 --- a/patches/minecraft/net/minecraft/world/entity/Entity.java.patch +++ b/patches/minecraft/net/minecraft/world/entity/Entity.java.patch @@ -241,7 +241,7 @@ } public boolean m_7306_(Entity p_20356_) { -@@ -2237,14 +_,19 @@ +@@ -2237,14 +_,20 @@ @Nullable public Entity m_5489_(ServerLevel p_20118_) { @@ -249,6 +249,7 @@ + } + @Nullable + public Entity changeDimension(ServerLevel p_20118_, net.minecraftforge.common.util.ITeleporter teleporter) { ++ if (!net.minecraftforge.common.ForgeHooks.onTravelToDimension(this, p_20118_.m_46472_())) return null; if (this.f_19853_ instanceof ServerLevel && !this.m_146910_()) { this.f_19853_.m_46473_().m_6180_("changeDimension"); this.m_19877_();