Skip to content

Commit

Permalink
Fix east west patch event causing crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
Samsuik committed Jun 8, 2024
1 parent e22638a commit 457d46e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 28 deletions.
6 changes: 3 additions & 3 deletions patches/server/0090-Add-EastWestPatchEvent.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
From bb3fc2b63ccfef6e353747144a8a972c15a7a47a Mon Sep 17 00:00:00 2001
From 5cab65fc56ea166eaf6795e896590ccb6c66e9ed Mon Sep 17 00:00:00 2001
From: Samsuik <[email protected]>
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 {
Expand All @@ -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();
Expand Down
25 changes: 0 additions & 25 deletions patches/server/0124-warn-about-invalid-gameprofiles.patch

This file was deleted.

0 comments on commit 457d46e

Please sign in to comment.