50 lines
2.4 KiB
Diff
50 lines
2.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
|
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<Entity> 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
|
|
}
|