From d61c5e92bf26cfc1f6fda229a8e33ff9422a61dd Mon Sep 17 00:00:00 2001 From: Helvetica Volubi Date: Sun, 27 Apr 2025 14:27:00 +0800 Subject: [PATCH 1/4] fix: TNT Nether Portal break portal fix --- ...5-TNT-Nether-Portal-break-portal-fix.patch | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 luminol-server/minecraft-patches/features/0055-TNT-Nether-Portal-break-portal-fix.patch diff --git a/luminol-server/minecraft-patches/features/0055-TNT-Nether-Portal-break-portal-fix.patch b/luminol-server/minecraft-patches/features/0055-TNT-Nether-Portal-break-portal-fix.patch new file mode 100644 index 0000000..9a3f1c7 --- /dev/null +++ b/luminol-server/minecraft-patches/features/0055-TNT-Nether-Portal-break-portal-fix.patch @@ -0,0 +1,36 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Helvetica Volubi +Date: Sun, 27 Apr 2025 14:26:01 +0800 +Subject: [PATCH] TNT Nether Portal break portal fix + + +diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java +index ceca76a5791e319dd7cc4048c9860b1df065b95a..1fa7f9f60c86606f355c7ff6405dbf7af011e50b 100644 +--- a/net/minecraft/world/entity/Entity.java ++++ b/net/minecraft/world/entity/Entity.java +@@ -4628,6 +4628,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + info.postTeleportTransition().onTransition(teleported); + } + ++ // Luminol start - TNT Nether Portal break portal fix ++ if (teleported instanceof net.minecraft.world.entity.item.PrimedTnt){ ++ ((net.minecraft.world.entity.item.PrimedTnt) teleported).setUsedPortal(true); ++ } ++ // Luminol end - TNT Nether Portal break portal fix ++ + // Kaiiju start - vanilla end teleportation + /*if (teleportComplete != null) { + teleportComplete.accept(teleported); +diff --git a/net/minecraft/world/entity/item/PrimedTnt.java b/net/minecraft/world/entity/item/PrimedTnt.java +index 88570bb4aa02896545805d7721c45cf9599befea..541328d10b7475d0751185ff1fb2a98a7f43a66e 100644 +--- a/net/minecraft/world/entity/item/PrimedTnt.java ++++ b/net/minecraft/world/entity/item/PrimedTnt.java +@@ -225,7 +225,7 @@ public class PrimedTnt extends Entity implements TraceableEntity { + return this.entityData.get(DATA_BLOCK_STATE_ID); + } + +- private void setUsedPortal(boolean usedPortal) { ++ public void setUsedPortal(boolean usedPortal) { // Luminol - TNT Nether Portal break portal fix + this.usedPortal = usedPortal; + } + From 34df6067cfdd4e0eca57db48f5baa0ba3a6e3439 Mon Sep 17 00:00:00 2001 From: Helvetica Volubi <88063803+Suisuroru@users.noreply.github.com> Date: Sun, 27 Apr 2025 17:21:02 +0800 Subject: [PATCH 2/4] ci: update build_1.21.4.yml fix an error in a file name --- .github/workflows/build_1.21.4.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_1.21.4.yml b/.github/workflows/build_1.21.4.yml index 8581728..8c9fc94 100644 --- a/.github/workflows/build_1.21.4.yml +++ b/.github/workflows/build_1.21.4.yml @@ -41,7 +41,7 @@ jobs: uses: "actions/upload-artifact@v4" with: name: "${{ env.project_id_b }} CI Artifacts" - path: "luminol-server/build/libs/*-paperclip.jar" + path: "luminol-server/build/libs/*-paperclip-*-mojmap.jar" - name: SetENV if: github.event_name != 'pull_request' run: sh scripts/SetENV.sh From c542cc1d2dd5aebc1c169ce8009f837bfe21f49a Mon Sep 17 00:00:00 2001 From: Helvetica Volubi Date: Sun, 27 Apr 2025 20:07:08 +0800 Subject: [PATCH 3/4] feat: add afterPortalLogic to process some logics --- ...erPortalLogic-to-process-some-logics.patch | 49 +++++++++++++++++++ ...5-TNT-Nether-Portal-break-portal-fix.patch | 36 -------------- 2 files changed, 49 insertions(+), 36 deletions(-) create mode 100644 luminol-server/minecraft-patches/features/0055-Add-afterPortalLogic-to-process-some-logics.patch delete mode 100644 luminol-server/minecraft-patches/features/0055-TNT-Nether-Portal-break-portal-fix.patch diff --git a/luminol-server/minecraft-patches/features/0055-Add-afterPortalLogic-to-process-some-logics.patch b/luminol-server/minecraft-patches/features/0055-Add-afterPortalLogic-to-process-some-logics.patch new file mode 100644 index 0000000..c881196 --- /dev/null +++ b/luminol-server/minecraft-patches/features/0055-Add-afterPortalLogic-to-process-some-logics.patch @@ -0,0 +1,49 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Helvetica Volubi +Date: Sun, 27 Apr 2025 14:26:01 +0800 +Subject: [PATCH] Add afterPortalLogic to process some logics + + +diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java +index ceca76a5791e319dd7cc4048c9860b1df065b95a..29f3ad07e28e6a92813bc446650c35c4d279c3ec 100644 +--- a/net/minecraft/world/entity/Entity.java ++++ b/net/minecraft/world/entity/Entity.java +@@ -4545,6 +4545,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + + } + ++ // Luminol start - Add afterPortalLogic ++ protected void afterPortalLogic() { ++ ++ } ++ // Luminol end - Add afterPortalLogic ++ + protected boolean portalToAsync(ServerLevel destination, BlockPos portalPos, boolean takePassengers, + PortalType type, java.util.function.Consumer teleportComplete) { + ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(this, "Cannot portal entity async"); +@@ -4628,6 +4634,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + info.postTeleportTransition().onTransition(teleported); + } + ++ // Luminol start - TNT Nether Portal break portal fix ++ teleported.afterPortalLogic(); // Luminol - Add afterPortalLogic ++ // Luminol end - TNT Nether Portal break portal fix ++ + // Kaiiju start - vanilla end teleportation + /*if (teleportComplete != null) { + teleportComplete.accept(teleported); +diff --git a/net/minecraft/world/entity/item/PrimedTnt.java b/net/minecraft/world/entity/item/PrimedTnt.java +index 88570bb4aa02896545805d7721c45cf9599befea..bbf9748a36404139356db606dbb3b0cc13c66b50 100644 +--- a/net/minecraft/world/entity/item/PrimedTnt.java ++++ b/net/minecraft/world/entity/item/PrimedTnt.java +@@ -251,4 +251,10 @@ public class PrimedTnt extends Entity implements TraceableEntity { + return !this.level().paperConfig().fixes.preventTntFromMovingInWater && super.isPushedByFluid(); + } + // Paper end - Option to prevent TNT from moving in water ++ ++ // Luminol start - Add afterPortalLogic ++ protected void afterPortalLogic() { ++ this.setUsedPortal(true); ++ } ++ // Luminol start - Add afterPortalLogic + } diff --git a/luminol-server/minecraft-patches/features/0055-TNT-Nether-Portal-break-portal-fix.patch b/luminol-server/minecraft-patches/features/0055-TNT-Nether-Portal-break-portal-fix.patch deleted file mode 100644 index 9a3f1c7..0000000 --- a/luminol-server/minecraft-patches/features/0055-TNT-Nether-Portal-break-portal-fix.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Helvetica Volubi -Date: Sun, 27 Apr 2025 14:26:01 +0800 -Subject: [PATCH] TNT Nether Portal break portal fix - - -diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index ceca76a5791e319dd7cc4048c9860b1df065b95a..1fa7f9f60c86606f355c7ff6405dbf7af011e50b 100644 ---- a/net/minecraft/world/entity/Entity.java -+++ b/net/minecraft/world/entity/Entity.java -@@ -4628,6 +4628,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - info.postTeleportTransition().onTransition(teleported); - } - -+ // Luminol start - TNT Nether Portal break portal fix -+ if (teleported instanceof net.minecraft.world.entity.item.PrimedTnt){ -+ ((net.minecraft.world.entity.item.PrimedTnt) teleported).setUsedPortal(true); -+ } -+ // Luminol end - TNT Nether Portal break portal fix -+ - // Kaiiju start - vanilla end teleportation - /*if (teleportComplete != null) { - teleportComplete.accept(teleported); -diff --git a/net/minecraft/world/entity/item/PrimedTnt.java b/net/minecraft/world/entity/item/PrimedTnt.java -index 88570bb4aa02896545805d7721c45cf9599befea..541328d10b7475d0751185ff1fb2a98a7f43a66e 100644 ---- a/net/minecraft/world/entity/item/PrimedTnt.java -+++ b/net/minecraft/world/entity/item/PrimedTnt.java -@@ -225,7 +225,7 @@ public class PrimedTnt extends Entity implements TraceableEntity { - return this.entityData.get(DATA_BLOCK_STATE_ID); - } - -- private void setUsedPortal(boolean usedPortal) { -+ public void setUsedPortal(boolean usedPortal) { // Luminol - TNT Nether Portal break portal fix - this.usedPortal = usedPortal; - } - From f1a0c96c7fbe429cb33c4ec22e5dc76894707e50 Mon Sep 17 00:00:00 2001 From: Helvetica Volubi Date: Sun, 27 Apr 2025 20:14:58 +0800 Subject: [PATCH 4/4] fixup note --- .../0055-Add-afterPortalLogic-to-process-some-logics.patch | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/luminol-server/minecraft-patches/features/0055-Add-afterPortalLogic-to-process-some-logics.patch b/luminol-server/minecraft-patches/features/0055-Add-afterPortalLogic-to-process-some-logics.patch index c881196..d932874 100644 --- a/luminol-server/minecraft-patches/features/0055-Add-afterPortalLogic-to-process-some-logics.patch +++ b/luminol-server/minecraft-patches/features/0055-Add-afterPortalLogic-to-process-some-logics.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add afterPortalLogic to process some logics diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index ceca76a5791e319dd7cc4048c9860b1df065b95a..29f3ad07e28e6a92813bc446650c35c4d279c3ec 100644 +index ceca76a5791e319dd7cc4048c9860b1df065b95a..065e74d29eee35e07a0d5db8850dc6f93a9729c0 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java @@ -4545,6 +4545,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -21,13 +21,11 @@ index ceca76a5791e319dd7cc4048c9860b1df065b95a..29f3ad07e28e6a92813bc446650c35c4 protected boolean portalToAsync(ServerLevel destination, BlockPos portalPos, boolean takePassengers, PortalType type, java.util.function.Consumer teleportComplete) { ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(this, "Cannot portal entity async"); -@@ -4628,6 +4634,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4628,6 +4634,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess info.postTeleportTransition().onTransition(teleported); } -+ // Luminol start - TNT Nether Portal break portal fix + teleported.afterPortalLogic(); // Luminol - Add afterPortalLogic -+ // Luminol end - TNT Nether Portal break portal fix + // Kaiiju start - vanilla end teleportation /*if (teleportComplete != null) {