From 457d46ee0fe1844be91e072d10e257d23f35b924 Mon Sep 17 00:00:00 2001 From: Samsuik <40902469+Samsuik@users.noreply.github.com> Date: Sat, 8 Jun 2024 23:16:15 +0100 Subject: [PATCH] Fix east west patch event causing crashes --- .../server/0090-Add-EastWestPatchEvent.patch | 6 ++--- ...0124-warn-about-invalid-gameprofiles.patch | 25 ------------------- 2 files changed, 3 insertions(+), 28 deletions(-) delete mode 100644 patches/server/0124-warn-about-invalid-gameprofiles.patch diff --git a/patches/server/0090-Add-EastWestPatchEvent.patch b/patches/server/0090-Add-EastWestPatchEvent.patch index 2b65579..56fc193 100644 --- a/patches/server/0090-Add-EastWestPatchEvent.patch +++ b/patches/server/0090-Add-EastWestPatchEvent.patch @@ -1,11 +1,11 @@ -From bb3fc2b63ccfef6e353747144a8a972c15a7a47a Mon Sep 17 00:00:00 2001 +From 5cab65fc56ea166eaf6795e896590ccb6c66e9ed Mon Sep 17 00:00:00 2001 From: Samsuik <40902469+Samsuik@users.noreply.github.com> Date: Sat, 8 Jul 2023 21:58:24 +0100 Subject: [PATCH] Add EastWestPatchEvent diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 6599c0142..574de6c75 100644 +index 6599c0142..15b2f4306 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -283,6 +283,7 @@ public abstract class Entity implements ICommandListener { @@ -22,7 +22,7 @@ index 6599c0142..574de6c75 100644 // Blossom end + // Blossom start + this.eastWestPatched = world != null && world.tacoSpigotConfig.fixEastWest; -+ if (world != null && me.samsuik.blossom.events.entity.EastWestPatchEvent.getHandlerList().getRegisteredListeners().length != 0) { ++ if (world != null && this.isCannoningEntity && me.samsuik.blossom.events.entity.EastWestPatchEvent.getHandlerList().getRegisteredListeners().length != 0) { + me.samsuik.blossom.events.entity.EastWestPatchEvent event = new me.samsuik.blossom.events.entity.EastWestPatchEvent(getBukkitEntity(), eastWestPatched); + org.bukkit.Bukkit.getPluginManager().callEvent(event); + this.eastWestPatched = event.isEastWestPatched(); diff --git a/patches/server/0124-warn-about-invalid-gameprofiles.patch b/patches/server/0124-warn-about-invalid-gameprofiles.patch deleted file mode 100644 index 973058e..0000000 --- a/patches/server/0124-warn-about-invalid-gameprofiles.patch +++ /dev/null @@ -1,25 +0,0 @@ -From ad02a7a0d44ae1edcee12660f646c73f2aa8587b Mon Sep 17 00:00:00 2001 -From: Samsuik <40902469+Samsuik@users.noreply.github.com> -Date: Sun, 2 Jun 2024 13:53:04 +0100 -Subject: [PATCH] warn about invalid gameprofiles - - -diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 0ffb3277c..7cc24ed2c 100644 ---- a/src/main/java/net/minecraft/server/PlayerList.java -+++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -411,6 +411,11 @@ public abstract class PlayerList { - public EntityPlayer attemptLogin(LoginListener loginlistener, GameProfile gameprofile, String hostname) { - // Moved from processLogin - UUID uuid = EntityHuman.a(gameprofile); -+ // Blossom start - warn about invalid gameprofiles -+ if (gameprofile.getId() == null) { -+ f.warn("User {} was not assigned a uuid before login", gameprofile.getName(), new Throwable()); -+ } -+ // Blossom end - ArrayList arraylist = Lists.newArrayList(); - - EntityPlayer entityplayer; --- -2.40.0.windows.1 -