9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-29 11:59:17 +00:00

Fix patch

This commit is contained in:
Lumine1909
2025-07-06 02:16:20 -07:00
parent e98fd56263
commit 88c1f86cf1

View File

@@ -32,11 +32,11 @@ index 6e7033ceb43acf8afd4c27a4d130e8a3dd8c1eef..1b13e7bc16f0e13e8c7bdb3b4b744c83
@@ -185,7 +185,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
// Paper end - Share random for entities to make them more random
public @Nullable org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason; // Paper - Entity#getEntitySpawnReason
- private volatile @Nullable org.bukkit.craftbukkit.entity.CraftEntity bukkitEntity; // Paper - Folia schedulers - volatile
+ public volatile @Nullable org.bukkit.craftbukkit.entity.CraftEntity bukkitEntity; // Paper - Folia schedulers - volatile // Leaves - private -> public
public boolean collisionLoadChunks = false; // Paper
public org.bukkit.craftbukkit.entity.CraftEntity getBukkitEntity() {
@@ -3956,7 +3956,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@Nullable
@@ -53,12 +53,12 @@ index 6e7033ceb43acf8afd4c27a4d130e8a3dd8c1eef..1b13e7bc16f0e13e8c7bdb3b4b744c83
entityx.teleportSetPosition(PositionMoveRotation.of(teleportTransition), teleportTransition.relatives());
- if (this.inWorld) newLevel.addDuringTeleport(entityx); // CraftBukkit - Don't spawn the new entity if the current entity isn't spawned
+ if (this.inWorld || (org.leavesmc.leaves.LeavesConfig.modify.oldMC.enderDragonPartCanUseEndPortal && this instanceof net.minecraft.world.entity.boss.EnderDragonPart)) newLevel.addDuringTeleport(entityx); // CraftBukkit - Don't spawn the new entity if the current entity isn't spawned // Leaves - endDragonPartCanUseEndPortal
for (Entity entity2 : list) {
entity2.startRiding(entityx, true);
@@ -4207,6 +4207,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
public boolean canTeleport(Level fromLevel, Level toLevel) {
+ if (org.leavesmc.leaves.LeavesConfig.modify.oldMC.enderDragonPartCanUseEndPortal && this instanceof net.minecraft.world.entity.boss.EnderDragonPart) return true; // Leaves - enderDragonPartCanUseEndPortal
if (!org.leavesmc.leaves.LeavesConfig.modify.oldMC.allowEntityPortalWithPassenger && (this.isPassenger() || this.isVehicle())) return false; // Leaves - allowEntityPortalWithPassenger
@@ -83,7 +83,7 @@ index c05803a72b5db05f9a0b6119b57f665a25e1277a..3f0077d2f1486bfac30d8161f7cc43bf
+ }
+ // Leaves end - ender dragon part can use end portal
}
protected void updateControlFlags() {
diff --git a/net/minecraft/world/entity/PortalProcessor.java b/net/minecraft/world/entity/PortalProcessor.java
index 88b07fbb96b20124777889830afa480673629d43..250c43fb38e2aabd0b58ef44c477f07eee48bce7 100644
@@ -91,10 +91,10 @@ index 88b07fbb96b20124777889830afa480673629d43..250c43fb38e2aabd0b58ef44c477f07e
+++ b/net/minecraft/world/entity/PortalProcessor.java
@@ -7,7 +7,7 @@ import net.minecraft.world.level.block.Portal;
import net.minecraft.world.level.portal.TeleportTransition;
public class PortalProcessor {
- private final Portal portal;
+ public final Portal portal; // Leaves - private -> public
private BlockPos entryPosition;
private int portalTime;
private boolean insidePortalThisTick;
private boolean insidePortalThisTick;