Skip to content

Commit 2f58805

Browse files
committed
Rebase
1 parent 8129c9c commit 2f58805

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

patches/server/1069-Configurable-Entity-Despawn-Time.patch renamed to patches/server/1068-Configurable-Entity-Despawn-Time.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,26 @@ Subject: [PATCH] Configurable Entity Despawn Time
55

66

77
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
8-
index 4b54d0ea31062972e68ee8fafe3cfaf68f65a5cd..a95d2d2b933bce0c5810d386208d67b154f75a9d 100644
8+
index 8be1b051543cda2b2e9e3d337834757e53f442de..ed5b00620527c1776722d25b1b45f1544802a341 100644
99
--- a/src/main/java/net/minecraft/world/entity/Entity.java
1010
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
11-
@@ -429,6 +429,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
11+
@@ -432,6 +432,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
1212
private UUID originWorld;
1313
public boolean freezeLocked = false; // Paper - Freeze Tick Lock API
1414
public boolean fixedPose = false; // Paper - Expand Pose API
1515
+ private final int despawnTime; // Paper - entity despawn time limit
1616

1717
public void setOrigin(@javax.annotation.Nonnull Location location) {
1818
this.origin = location.toVector();
19-
@@ -552,6 +553,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
19+
@@ -614,6 +615,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
2020

2121
public Entity(EntityType<?> type, Level world) {
2222
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
2323
+ this.despawnTime = type == EntityType.PLAYER ? -1 : world.paperConfig().entities.spawning.despawnTime.getOrDefault(type, io.papermc.paper.configuration.type.number.IntOr.Disabled.DISABLED).or(-1); // Paper - entity despawn time limit
2424
this.passengers = ImmutableList.of();
2525
this.deltaMovement = Vec3.ZERO;
2626
this.bb = Entity.INITIAL_AABB;
27-
@@ -845,6 +847,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
27+
@@ -912,6 +914,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
2828
}
2929

3030
public void tick() {

0 commit comments

Comments
 (0)