mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2026-01-06 15:51:31 +00:00
fix despawnInPeacefulOverride API and inline check despawn (#513)
* fix despawnInPeacefulOverride API and inline check despawn
* Revert "fix despawnInPeacefulOverride API and inline check despawn"
This reverts commit 82e37493fd.
* check despawn
* fix frozen
* rebuild patches
This commit is contained in:
@@ -20,10 +20,10 @@ Brings the ability to despawn weak-loaded entities once they are ticked,
|
||||
a solution for https://github.com/PaperMC/Paper/issues/12986
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index f58b91b277ba85fa7c0e7ad10157ecbf10023065..b7f9f22abf60c75bc09126d9168fda9a0ee2375f 100644
|
||||
index cb1be4947ea2d85c6dcdc7424a4b712dcce0a40e..01f7390f3fb2a423cec373a2bb5ccbee57278783 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1515,6 +1515,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -1509,6 +1509,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
entity.tick();
|
||||
entity.postTick(); // CraftBukkit
|
||||
} else {entity.inactiveTick();} // Paper - EAR 2
|
||||
@@ -31,7 +31,7 @@ index f58b91b277ba85fa7c0e7ad10157ecbf10023065..b7f9f22abf60c75bc09126d9168fda9a
|
||||
|
||||
for (Entity entity1 : entity.getPassengers()) {
|
||||
this.tickPassenger(entity, entity1, isActive); // Paper - EAR 2
|
||||
@@ -1539,6 +1540,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -1533,6 +1534,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
ridingEntity.positionRider(passengerEntity);
|
||||
}
|
||||
// Paper end - EAR 2
|
||||
@@ -40,7 +40,7 @@ index f58b91b277ba85fa7c0e7ad10157ecbf10023065..b7f9f22abf60c75bc09126d9168fda9a
|
||||
for (Entity entity : passengerEntity.getPassengers()) {
|
||||
this.tickPassenger(passengerEntity, entity, isActive); // Paper - EAR 2
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index f6d619709d4e5b0e6d1b943226579d7388835cdb..0c35f5f5a9d9afad457e2ab723f90feeefe5413d 100644
|
||||
index fef583625899091b13439e0d459b7538c866d712..e84ff9d5a1b495170b503dece72f7766b347c2d0 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -373,6 +373,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -135,7 +135,7 @@ index f6d619709d4e5b0e6d1b943226579d7388835cdb..0c35f5f5a9d9afad457e2ab723f90fee
|
||||
this.totalEntityAge = input.getIntOr("Spigot.ticksLived", 0); // Paper
|
||||
}
|
||||
// Spigot end
|
||||
@@ -5327,9 +5366,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -5320,9 +5359,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
@Override
|
||||
public boolean shouldBeSaved() {
|
||||
|
||||
Reference in New Issue
Block a user