geforkt von Mirrors/Paper
fix FullChunkAccess enum move (#9281)
Dieser Commit ist enthalten in:
Ursprung
37e689f367
Commit
7002799587
@ -2662,10 +2662,10 @@ index 0000000000000000000000000000000000000000..a5f706d6f716b2a463ae58adcde69d9e
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java b/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java
|
diff --git a/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java b/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..8a5e93961dac4d87c81c0e70b6f4124a1f1d2556
|
index 0000000000000000000000000000000000000000..95eac2e12a16938d81ab512b00e90c5234b42834
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java
|
+++ b/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java
|
||||||
@@ -0,0 +1,294 @@
|
@@ -0,0 +1,295 @@
|
||||||
+package io.papermc.paper.chunk.system;
|
+package io.papermc.paper.chunk.system;
|
||||||
+
|
+
|
||||||
+import ca.spottedleaf.concurrentutil.executor.standard.PrioritisedExecutor;
|
+import ca.spottedleaf.concurrentutil.executor.standard.PrioritisedExecutor;
|
||||||
@ -2675,6 +2675,7 @@ index 0000000000000000000000000000000000000000..8a5e93961dac4d87c81c0e70b6f4124a
|
|||||||
+import io.papermc.paper.util.CoordinateUtils;
|
+import io.papermc.paper.util.CoordinateUtils;
|
||||||
+import net.minecraft.server.level.ChunkHolder;
|
+import net.minecraft.server.level.ChunkHolder;
|
||||||
+import net.minecraft.server.level.ChunkMap;
|
+import net.minecraft.server.level.ChunkMap;
|
||||||
|
+import net.minecraft.server.level.FullChunkStatus;
|
||||||
+import net.minecraft.server.level.ServerLevel;
|
+import net.minecraft.server.level.ServerLevel;
|
||||||
+import net.minecraft.server.level.ServerPlayer;
|
+import net.minecraft.server.level.ServerPlayer;
|
||||||
+import net.minecraft.server.level.TicketType;
|
+import net.minecraft.server.level.TicketType;
|
||||||
@ -2787,7 +2788,7 @@ index 0000000000000000000000000000000000000000..8a5e93961dac4d87c81c0e70b6f4124a
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public static void scheduleTickingState(final ServerLevel level, final int chunkX, final int chunkZ,
|
+ public static void scheduleTickingState(final ServerLevel level, final int chunkX, final int chunkZ,
|
||||||
+ final ChunkHolder.FullChunkStatus toStatus, final boolean addTicket,
|
+ final FullChunkStatus toStatus, final boolean addTicket,
|
||||||
+ final PrioritisedExecutor.Priority priority, final Consumer<LevelChunk> onComplete) {
|
+ final PrioritisedExecutor.Priority priority, final Consumer<LevelChunk> onComplete) {
|
||||||
+ if (toStatus == ChunkHolder.FullChunkStatus.INACCESSIBLE) {
|
+ if (toStatus == ChunkHolder.FullChunkStatus.INACCESSIBLE) {
|
||||||
+ throw new IllegalArgumentException("Cannot wait for INACCESSIBLE status");
|
+ throw new IllegalArgumentException("Cannot wait for INACCESSIBLE status");
|
||||||
|
@ -2500,10 +2500,10 @@ index 0000000000000000000000000000000000000000..562630db2cf5f923bf5b611b828a365e
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java b/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java
|
diff --git a/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java b/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java
|
||||||
index 8a5e93961dac4d87c81c0e70b6f4124a1f1d2556..97edd4e8d3524c839a1765b6515deacae112ff4b 100644
|
index 95eac2e12a16938d81ab512b00e90c5234b42834..8f7bf1f0400aeab8b7801d113d244d0716c5eb84 100644
|
||||||
--- a/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java
|
--- a/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java
|
||||||
+++ b/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java
|
+++ b/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java
|
||||||
@@ -31,191 +31,41 @@ public final class ChunkSystem {
|
@@ -32,191 +32,41 @@ public final class ChunkSystem {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void scheduleChunkTask(final ServerLevel level, final int chunkX, final int chunkZ, final Runnable run, final PrioritisedExecutor.Priority priority) {
|
public static void scheduleChunkTask(final ServerLevel level, final int chunkX, final int chunkZ, final Runnable run, final PrioritisedExecutor.Priority priority) {
|
||||||
@ -2599,7 +2599,7 @@ index 8a5e93961dac4d87c81c0e70b6f4124a1f1d2556..97edd4e8d3524c839a1765b6515deaca
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void scheduleTickingState(final ServerLevel level, final int chunkX, final int chunkZ,
|
public static void scheduleTickingState(final ServerLevel level, final int chunkX, final int chunkZ,
|
||||||
final ChunkHolder.FullChunkStatus toStatus, final boolean addTicket,
|
final FullChunkStatus toStatus, final boolean addTicket,
|
||||||
final PrioritisedExecutor.Priority priority, final Consumer<LevelChunk> onComplete) {
|
final PrioritisedExecutor.Priority priority, final Consumer<LevelChunk> onComplete) {
|
||||||
- if (toStatus == ChunkHolder.FullChunkStatus.INACCESSIBLE) {
|
- if (toStatus == ChunkHolder.FullChunkStatus.INACCESSIBLE) {
|
||||||
- throw new IllegalArgumentException("Cannot wait for INACCESSIBLE status");
|
- throw new IllegalArgumentException("Cannot wait for INACCESSIBLE status");
|
||||||
@ -2704,7 +2704,7 @@ index 8a5e93961dac4d87c81c0e70b6f4124a1f1d2556..97edd4e8d3524c839a1765b6515deaca
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean hasAnyChunkHolders(final ServerLevel level) {
|
public static boolean hasAnyChunkHolders(final ServerLevel level) {
|
||||||
@@ -269,23 +119,15 @@ public final class ChunkSystem {
|
@@ -270,23 +120,15 @@ public final class ChunkSystem {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getSendViewDistance(final ServerPlayer player) {
|
public static int getSendViewDistance(final ServerPlayer player) {
|
||||||
@ -4156,10 +4156,10 @@ index 0000000000000000000000000000000000000000..48bfee5b9db501fcdba4ddb1e4bff271
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/io/papermc/paper/chunk/system/entity/EntityLookup.java b/src/main/java/io/papermc/paper/chunk/system/entity/EntityLookup.java
|
diff --git a/src/main/java/io/papermc/paper/chunk/system/entity/EntityLookup.java b/src/main/java/io/papermc/paper/chunk/system/entity/EntityLookup.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..61c170555c8854b102c640b0b6a615f9f732edbf
|
index 0000000000000000000000000000000000000000..82ccaf612548a7dbab7e5aeffb6eb8db84367477
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/io/papermc/paper/chunk/system/entity/EntityLookup.java
|
+++ b/src/main/java/io/papermc/paper/chunk/system/entity/EntityLookup.java
|
||||||
@@ -0,0 +1,839 @@
|
@@ -0,0 +1,840 @@
|
||||||
+package io.papermc.paper.chunk.system.entity;
|
+package io.papermc.paper.chunk.system.entity;
|
||||||
+
|
+
|
||||||
+import com.destroystokyo.paper.util.maplist.EntityList;
|
+import com.destroystokyo.paper.util.maplist.EntityList;
|
||||||
@ -4182,6 +4182,7 @@ index 0000000000000000000000000000000000000000..61c170555c8854b102c640b0b6a615f9
|
|||||||
+import net.minecraft.world.level.entity.EntityInLevelCallback;
|
+import net.minecraft.world.level.entity.EntityInLevelCallback;
|
||||||
+import net.minecraft.world.level.entity.EntityTypeTest;
|
+import net.minecraft.world.level.entity.EntityTypeTest;
|
||||||
+import net.minecraft.world.level.entity.LevelCallback;
|
+import net.minecraft.world.level.entity.LevelCallback;
|
||||||
|
+import net.minecraft.server.level.FullChunkStatus;
|
||||||
+import net.minecraft.world.level.entity.LevelEntityGetter;
|
+import net.minecraft.world.level.entity.LevelEntityGetter;
|
||||||
+import net.minecraft.world.level.entity.Visibility;
|
+import net.minecraft.world.level.entity.Visibility;
|
||||||
+import net.minecraft.world.phys.AABB;
|
+import net.minecraft.world.phys.AABB;
|
||||||
@ -4462,7 +4463,7 @@ index 0000000000000000000000000000000000000000..61c170555c8854b102c640b0b6a615f9
|
|||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public void chunkStatusChange(final int x, final int z, final ChunkHolder.FullChunkStatus newStatus) {
|
+ public void chunkStatusChange(final int x, final int z, final FullChunkStatus newStatus) {
|
||||||
+ this.getChunk(x, z).updateStatus(newStatus, this);
|
+ this.getChunk(x, z).updateStatus(newStatus, this);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -4492,8 +4493,8 @@ index 0000000000000000000000000000000000000000..61c170555c8854b102c640b0b6a615f9
|
|||||||
+ if (entity.isAlwaysTicking()) {
|
+ if (entity.isAlwaysTicking()) {
|
||||||
+ return Visibility.TICKING;
|
+ return Visibility.TICKING;
|
||||||
+ }
|
+ }
|
||||||
+ final ChunkHolder.FullChunkStatus entityStatus = entity.chunkStatus;
|
+ final FullChunkStatus entityStatus = entity.chunkStatus;
|
||||||
+ return Visibility.fromFullChunkStatus(entityStatus == null ? ChunkHolder.FullChunkStatus.INACCESSIBLE : entityStatus);
|
+ return Visibility.fromFullChunkStatus(entityStatus == null ? FullChunkStatus.INACCESSIBLE : entityStatus);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ private boolean addEntity(final Entity entity, final boolean fromDisk) {
|
+ private boolean addEntity(final Entity entity, final boolean fromDisk) {
|
||||||
@ -4649,7 +4650,7 @@ index 0000000000000000000000000000000000000000..61c170555c8854b102c640b0b6a615f9
|
|||||||
+ for (int currZ = minZ; currZ <= maxZ; ++currZ) {
|
+ for (int currZ = minZ; currZ <= maxZ; ++currZ) {
|
||||||
+ for (int currX = minX; currX <= maxX; ++currX) {
|
+ for (int currX = minX; currX <= maxX; ++currX) {
|
||||||
+ final ChunkEntitySlices chunk = region.get(currX | (currZ << REGION_SHIFT));
|
+ final ChunkEntitySlices chunk = region.get(currX | (currZ << REGION_SHIFT));
|
||||||
+ if (chunk == null || !chunk.status.isOrAfter(ChunkHolder.FullChunkStatus.BORDER)) {
|
+ if (chunk == null || !chunk.status.isOrAfter(FullChunkStatus.FULL)) {
|
||||||
+ continue;
|
+ continue;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -4688,7 +4689,7 @@ index 0000000000000000000000000000000000000000..61c170555c8854b102c640b0b6a615f9
|
|||||||
+ for (int currZ = minZ; currZ <= maxZ; ++currZ) {
|
+ for (int currZ = minZ; currZ <= maxZ; ++currZ) {
|
||||||
+ for (int currX = minX; currX <= maxX; ++currX) {
|
+ for (int currX = minX; currX <= maxX; ++currX) {
|
||||||
+ final ChunkEntitySlices chunk = region.get(currX | (currZ << REGION_SHIFT));
|
+ final ChunkEntitySlices chunk = region.get(currX | (currZ << REGION_SHIFT));
|
||||||
+ if (chunk == null || !chunk.status.isOrAfter(ChunkHolder.FullChunkStatus.BORDER)) {
|
+ if (chunk == null || !chunk.status.isOrAfter(FullChunkStatus.FULL)) {
|
||||||
+ continue;
|
+ continue;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -4727,7 +4728,7 @@ index 0000000000000000000000000000000000000000..61c170555c8854b102c640b0b6a615f9
|
|||||||
+ for (int currZ = minZ; currZ <= maxZ; ++currZ) {
|
+ for (int currZ = minZ; currZ <= maxZ; ++currZ) {
|
||||||
+ for (int currX = minX; currX <= maxX; ++currX) {
|
+ for (int currX = minX; currX <= maxX; ++currX) {
|
||||||
+ final ChunkEntitySlices chunk = region.get(currX | (currZ << REGION_SHIFT));
|
+ final ChunkEntitySlices chunk = region.get(currX | (currZ << REGION_SHIFT));
|
||||||
+ if (chunk == null || !chunk.status.isOrAfter(ChunkHolder.FullChunkStatus.BORDER)) {
|
+ if (chunk == null || !chunk.status.isOrAfter(FullChunkStatus.FULL)) {
|
||||||
+ continue;
|
+ continue;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -4767,7 +4768,7 @@ index 0000000000000000000000000000000000000000..61c170555c8854b102c640b0b6a615f9
|
|||||||
+ for (int currZ = minZ; currZ <= maxZ; ++currZ) {
|
+ for (int currZ = minZ; currZ <= maxZ; ++currZ) {
|
||||||
+ for (int currX = minX; currX <= maxX; ++currX) {
|
+ for (int currX = minX; currX <= maxX; ++currX) {
|
||||||
+ final ChunkEntitySlices chunk = region.get(currX | (currZ << REGION_SHIFT));
|
+ final ChunkEntitySlices chunk = region.get(currX | (currZ << REGION_SHIFT));
|
||||||
+ if (chunk == null || !chunk.status.isOrAfter(ChunkHolder.FullChunkStatus.BORDER)) {
|
+ if (chunk == null || !chunk.status.isOrAfter(FullChunkStatus.FULL)) {
|
||||||
+ continue;
|
+ continue;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -4807,7 +4808,7 @@ index 0000000000000000000000000000000000000000..61c170555c8854b102c640b0b6a615f9
|
|||||||
+ for (int currZ = minZ; currZ <= maxZ; ++currZ) {
|
+ for (int currZ = minZ; currZ <= maxZ; ++currZ) {
|
||||||
+ for (int currX = minX; currX <= maxX; ++currX) {
|
+ for (int currX = minX; currX <= maxX; ++currX) {
|
||||||
+ final ChunkEntitySlices chunk = region.get(currX | (currZ << REGION_SHIFT));
|
+ final ChunkEntitySlices chunk = region.get(currX | (currZ << REGION_SHIFT));
|
||||||
+ if (chunk == null || !chunk.status.isOrAfter(ChunkHolder.FullChunkStatus.BORDER)) {
|
+ if (chunk == null || !chunk.status.isOrAfter(FullChunkStatus.FULL)) {
|
||||||
+ continue;
|
+ continue;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -6994,10 +6995,10 @@ index 0000000000000000000000000000000000000000..300700477ee34bc22b31315825c0e40f
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..718c1dd7b52fb9a501d552fdbcb3f9ff79d127d8
|
index 0000000000000000000000000000000000000000..4054bf71486734d722a6a3c7b0b4638188798609
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
||||||
@@ -0,0 +1,1371 @@
|
@@ -0,0 +1,1373 @@
|
||||||
+package io.papermc.paper.chunk.system.scheduling;
|
+package io.papermc.paper.chunk.system.scheduling;
|
||||||
+
|
+
|
||||||
+import ca.spottedleaf.concurrentutil.collection.MultiThreadedQueue;
|
+import ca.spottedleaf.concurrentutil.collection.MultiThreadedQueue;
|
||||||
@ -7027,7 +7028,9 @@ index 0000000000000000000000000000000000000000..718c1dd7b52fb9a501d552fdbcb3f9ff
|
|||||||
+import io.papermc.paper.chunk.system.ChunkSystem;
|
+import io.papermc.paper.chunk.system.ChunkSystem;
|
||||||
+import net.minecraft.server.MinecraftServer;
|
+import net.minecraft.server.MinecraftServer;
|
||||||
+import net.minecraft.server.level.ChunkHolder;
|
+import net.minecraft.server.level.ChunkHolder;
|
||||||
|
+import net.minecraft.server.level.ChunkLevel;
|
||||||
+import net.minecraft.server.level.ChunkMap;
|
+import net.minecraft.server.level.ChunkMap;
|
||||||
|
+import net.minecraft.server.level.FullChunkStatus;
|
||||||
+import net.minecraft.server.level.ServerLevel;
|
+import net.minecraft.server.level.ServerLevel;
|
||||||
+import net.minecraft.server.level.Ticket;
|
+import net.minecraft.server.level.Ticket;
|
||||||
+import net.minecraft.server.level.TicketType;
|
+import net.minecraft.server.level.TicketType;
|
||||||
@ -7061,7 +7064,7 @@ index 0000000000000000000000000000000000000000..718c1dd7b52fb9a501d552fdbcb3f9ff
|
|||||||
+ public static final int FULL_LOADED_TICKET_LEVEL = 33;
|
+ public static final int FULL_LOADED_TICKET_LEVEL = 33;
|
||||||
+ public static final int BLOCK_TICKING_TICKET_LEVEL = 32;
|
+ public static final int BLOCK_TICKING_TICKET_LEVEL = 32;
|
||||||
+ public static final int ENTITY_TICKING_TICKET_LEVEL = 31;
|
+ public static final int ENTITY_TICKING_TICKET_LEVEL = 31;
|
||||||
+ public static final int MAX_TICKET_LEVEL = ChunkMap.MAX_CHUNK_DISTANCE; // inclusive
|
+ public static final int MAX_TICKET_LEVEL = ChunkLevel.MAX_LEVEL; // inclusive
|
||||||
+
|
+
|
||||||
+ private static final long NO_TIMEOUT_MARKER = -1L;
|
+ private static final long NO_TIMEOUT_MARKER = -1L;
|
||||||
+
|
+
|
||||||
@ -7190,13 +7193,13 @@ index 0000000000000000000000000000000000000000..718c1dd7b52fb9a501d552fdbcb3f9ff
|
|||||||
+ ++autoSaved;
|
+ ++autoSaved;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (holder.getChunkStatus().isOrAfter(ChunkHolder.FullChunkStatus.BORDER)) {
|
+ if (holder.getChunkStatus().isOrAfter(FullChunkStatus.FULL)) {
|
||||||
+ reschedule.add(holder);
|
+ reschedule.add(holder);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ for (final NewChunkHolder holder : reschedule) {
|
+ for (final NewChunkHolder holder : reschedule) {
|
||||||
+ if (holder.getChunkStatus().isOrAfter(ChunkHolder.FullChunkStatus.BORDER)) {
|
+ if (holder.getChunkStatus().isOrAfter(FullChunkStatus.FULL)) {
|
||||||
+ this.autoSaveQueue.add(holder);
|
+ this.autoSaveQueue.add(holder);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
@ -7293,7 +7296,7 @@ index 0000000000000000000000000000000000000000..718c1dd7b52fb9a501d552fdbcb3f9ff
|
|||||||
+ // and the levels we get out of the propagator
|
+ // and the levels we get out of the propagator
|
||||||
+
|
+
|
||||||
+ public static int convertBetweenTicketLevels(final int level) {
|
+ public static int convertBetweenTicketLevels(final int level) {
|
||||||
+ return ChunkMap.MAX_CHUNK_DISTANCE - level + 1;
|
+ return ChunkLevel.MAX_LEVEL - level + 1;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public boolean hasTickets() {
|
+ public boolean hasTickets() {
|
||||||
@ -7353,7 +7356,7 @@ index 0000000000000000000000000000000000000000..718c1dd7b52fb9a501d552fdbcb3f9ff
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ protected final void updateTicketLevel(final long coordinate, final int ticketLevel) {
|
+ protected final void updateTicketLevel(final long coordinate, final int ticketLevel) {
|
||||||
+ if (ticketLevel > ChunkMap.MAX_CHUNK_DISTANCE) {
|
+ if (ticketLevel > ChunkLevel.MAX_LEVEL) {
|
||||||
+ this.ticketLevelPropagator.removeSource(coordinate);
|
+ this.ticketLevelPropagator.removeSource(coordinate);
|
||||||
+ } else {
|
+ } else {
|
||||||
+ this.ticketLevelPropagator.setSource(coordinate, convertBetweenTicketLevels(ticketLevel));
|
+ this.ticketLevelPropagator.setSource(coordinate, convertBetweenTicketLevels(ticketLevel));
|
||||||
@ -9158,20 +9161,22 @@ index 0000000000000000000000000000000000000000..322675a470eacbf0e5452f4009c643f2
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkTaskScheduler.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkTaskScheduler.java
|
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkTaskScheduler.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkTaskScheduler.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..d2bb266a5ed344507058778a94a8a4dcac61ba17
|
index 0000000000000000000000000000000000000000..39411cc2e4af6edf767cc06bbca8335b2c744abc
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkTaskScheduler.java
|
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkTaskScheduler.java
|
||||||
@@ -0,0 +1,770 @@
|
@@ -0,0 +1,774 @@
|
||||||
+package io.papermc.paper.chunk.system.scheduling;
|
+package io.papermc.paper.chunk.system.scheduling;
|
||||||
+
|
+
|
||||||
+import ca.spottedleaf.concurrentutil.executor.standard.PrioritisedExecutor;
|
+import ca.spottedleaf.concurrentutil.executor.standard.PrioritisedExecutor;
|
||||||
+import ca.spottedleaf.concurrentutil.executor.standard.PrioritisedThreadPool;
|
+import ca.spottedleaf.concurrentutil.executor.standard.PrioritisedThreadPool;
|
||||||
|
+import ca.spottedleaf.concurrentutil.executor.standard.PrioritisedThreadedTaskQueue;
|
||||||
+import ca.spottedleaf.concurrentutil.util.ConcurrentUtil;
|
+import ca.spottedleaf.concurrentutil.util.ConcurrentUtil;
|
||||||
+import com.mojang.logging.LogUtils;
|
+import com.mojang.logging.LogUtils;
|
||||||
+import io.papermc.paper.chunk.system.scheduling.queue.RadiusAwarePrioritisedExecutor;
|
+import io.papermc.paper.chunk.system.scheduling.queue.RadiusAwarePrioritisedExecutor;
|
||||||
+import io.papermc.paper.configuration.GlobalConfiguration;
|
+import io.papermc.paper.configuration.GlobalConfiguration;
|
||||||
+import io.papermc.paper.util.CoordinateUtils;
|
+import io.papermc.paper.util.CoordinateUtils;
|
||||||
+import io.papermc.paper.util.TickThread;
|
+import io.papermc.paper.util.TickThread;
|
||||||
|
+import java.util.function.BooleanSupplier;
|
||||||
+import net.minecraft.CrashReport;
|
+import net.minecraft.CrashReport;
|
||||||
+import net.minecraft.CrashReportCategory;
|
+import net.minecraft.CrashReportCategory;
|
||||||
+import net.minecraft.ReportedException;
|
+import net.minecraft.ReportedException;
|
||||||
@ -9179,12 +9184,14 @@ index 0000000000000000000000000000000000000000..d2bb266a5ed344507058778a94a8a4dc
|
|||||||
+import net.minecraft.server.MinecraftServer;
|
+import net.minecraft.server.MinecraftServer;
|
||||||
+import net.minecraft.server.level.ChunkHolder;
|
+import net.minecraft.server.level.ChunkHolder;
|
||||||
+import net.minecraft.server.level.ChunkMap;
|
+import net.minecraft.server.level.ChunkMap;
|
||||||
|
+import net.minecraft.server.level.FullChunkStatus;
|
||||||
+import net.minecraft.server.level.ServerLevel;
|
+import net.minecraft.server.level.ServerLevel;
|
||||||
+import net.minecraft.server.level.TicketType;
|
+import net.minecraft.server.level.TicketType;
|
||||||
+import net.minecraft.world.level.ChunkPos;
|
+import net.minecraft.world.level.ChunkPos;
|
||||||
+import net.minecraft.world.level.chunk.ChunkAccess;
|
+import net.minecraft.world.level.chunk.ChunkAccess;
|
||||||
+import net.minecraft.world.level.chunk.ChunkStatus;
|
+import net.minecraft.world.level.chunk.ChunkStatus;
|
||||||
+import net.minecraft.world.level.chunk.LevelChunk;
|
+import net.minecraft.world.level.chunk.LevelChunk;
|
||||||
|
+import org.bukkit.Bukkit;
|
||||||
+import org.slf4j.Logger;
|
+import org.slf4j.Logger;
|
||||||
+import java.io.File;
|
+import java.io.File;
|
||||||
+import java.util.ArrayDeque;
|
+import java.util.ArrayDeque;
|
||||||
@ -9420,7 +9427,7 @@ index 0000000000000000000000000000000000000000..d2bb266a5ed344507058778a94a8a4dc
|
|||||||
+
|
+
|
||||||
+ private final AtomicLong chunkLoadCounter = new AtomicLong();
|
+ private final AtomicLong chunkLoadCounter = new AtomicLong();
|
||||||
+
|
+
|
||||||
+ public void scheduleTickingState(final int chunkX, final int chunkZ, final ChunkHolder.FullChunkStatus toStatus,
|
+ public void scheduleTickingState(final int chunkX, final int chunkZ, final FullChunkStatus toStatus,
|
||||||
+ final boolean addTicket, final PrioritisedExecutor.Priority priority,
|
+ final boolean addTicket, final PrioritisedExecutor.Priority priority,
|
||||||
+ final Consumer<LevelChunk> onComplete) {
|
+ final Consumer<LevelChunk> onComplete) {
|
||||||
+ if (!TickThread.isTickThread()) {
|
+ if (!TickThread.isTickThread()) {
|
||||||
@ -9436,7 +9443,7 @@ index 0000000000000000000000000000000000000000..d2bb266a5ed344507058778a94a8a4dc
|
|||||||
+ throw new IllegalStateException("Cannot schedule chunk loading recursively");
|
+ throw new IllegalStateException("Cannot schedule chunk loading recursively");
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (toStatus == ChunkHolder.FullChunkStatus.INACCESSIBLE) {
|
+ if (toStatus == FullChunkStatus.INACCESSIBLE) {
|
||||||
+ throw new IllegalArgumentException("Cannot wait for INACCESSIBLE status");
|
+ throw new IllegalArgumentException("Cannot wait for INACCESSIBLE status");
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -9475,7 +9482,7 @@ index 0000000000000000000000000000000000000000..d2bb266a5ed344507058778a94a8a4dc
|
|||||||
+ scheduled = false;
|
+ scheduled = false;
|
||||||
+ chunk = null;
|
+ chunk = null;
|
||||||
+ } else {
|
+ } else {
|
||||||
+ final ChunkHolder.FullChunkStatus currStatus = chunkHolder.getChunkStatus();
|
+ final FullChunkStatus currStatus = chunkHolder.getChunkStatus();
|
||||||
+ if (currStatus.isOrAfter(toStatus)) {
|
+ if (currStatus.isOrAfter(toStatus)) {
|
||||||
+ scheduled = false;
|
+ scheduled = false;
|
||||||
+ chunk = (LevelChunk)chunkHolder.getCurrentChunk();
|
+ chunk = (LevelChunk)chunkHolder.getCurrentChunk();
|
||||||
@ -9552,7 +9559,7 @@ index 0000000000000000000000000000000000000000..d2bb266a5ed344507058778a94a8a4dc
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (toStatus == ChunkStatus.FULL) {
|
+ if (toStatus == ChunkStatus.FULL) {
|
||||||
+ this.scheduleTickingState(chunkX, chunkZ, ChunkHolder.FullChunkStatus.BORDER, addTicket, priority, (Consumer)onComplete);
|
+ this.scheduleTickingState(chunkX, chunkZ, FullChunkStatus.FULL, addTicket, priority, (Consumer)onComplete);
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -10904,10 +10911,10 @@ index 0000000000000000000000000000000000000000..396d72c00e47cf1669ae20dc839c1c96
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java
|
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..efc9b7a304f10b6a23a36cffb0a4aaea6ab71129
|
index 0000000000000000000000000000000000000000..72c813e1d359486fe8d6776aa82986586b8022f5
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java
|
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java
|
||||||
@@ -0,0 +1,2099 @@
|
@@ -0,0 +1,2100 @@
|
||||||
+package io.papermc.paper.chunk.system.scheduling;
|
+package io.papermc.paper.chunk.system.scheduling;
|
||||||
+
|
+
|
||||||
+import ca.spottedleaf.concurrentutil.completable.Completable;
|
+import ca.spottedleaf.concurrentutil.completable.Completable;
|
||||||
@ -10933,6 +10940,7 @@ index 0000000000000000000000000000000000000000..efc9b7a304f10b6a23a36cffb0a4aaea
|
|||||||
+import net.minecraft.nbt.CompoundTag;
|
+import net.minecraft.nbt.CompoundTag;
|
||||||
+import net.minecraft.server.level.ChunkHolder;
|
+import net.minecraft.server.level.ChunkHolder;
|
||||||
+import net.minecraft.server.level.ChunkMap;
|
+import net.minecraft.server.level.ChunkMap;
|
||||||
|
+import net.minecraft.server.level.FullChunkStatus;
|
||||||
+import net.minecraft.server.level.ServerLevel;
|
+import net.minecraft.server.level.ServerLevel;
|
||||||
+import net.minecraft.server.level.TicketType;
|
+import net.minecraft.server.level.TicketType;
|
||||||
+import net.minecraft.world.entity.Entity;
|
+import net.minecraft.world.entity.Entity;
|
||||||
@ -11994,58 +12002,58 @@ index 0000000000000000000000000000000000000000..efc9b7a304f10b6a23a36cffb0a4aaea
|
|||||||
+ // upper 16 bits are pending status, lower 16 bits are current status
|
+ // upper 16 bits are pending status, lower 16 bits are current status
|
||||||
+ private volatile long chunkStatus;
|
+ private volatile long chunkStatus;
|
||||||
+ private static final long PENDING_STATUS_MASK = Long.MIN_VALUE >> 31;
|
+ private static final long PENDING_STATUS_MASK = Long.MIN_VALUE >> 31;
|
||||||
+ private static final ChunkHolder.FullChunkStatus[] CHUNK_STATUS_BY_ID = ChunkHolder.FullChunkStatus.values();
|
+ private static final FullChunkStatus[] CHUNK_STATUS_BY_ID = FullChunkStatus.values();
|
||||||
+ private static final VarHandle CHUNK_STATUS_HANDLE = ConcurrentUtil.getVarHandle(NewChunkHolder.class, "chunkStatus", long.class);
|
+ private static final VarHandle CHUNK_STATUS_HANDLE = ConcurrentUtil.getVarHandle(NewChunkHolder.class, "chunkStatus", long.class);
|
||||||
+
|
+
|
||||||
+ public static ChunkHolder.FullChunkStatus getCurrentChunkStatus(final long encoded) {
|
+ public static FullChunkStatus getCurrentChunkStatus(final long encoded) {
|
||||||
+ return CHUNK_STATUS_BY_ID[(int)encoded];
|
+ return CHUNK_STATUS_BY_ID[(int)encoded];
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public static ChunkHolder.FullChunkStatus getPendingChunkStatus(final long encoded) {
|
+ public static FullChunkStatus getPendingChunkStatus(final long encoded) {
|
||||||
+ return CHUNK_STATUS_BY_ID[(int)(encoded >>> 32)];
|
+ return CHUNK_STATUS_BY_ID[(int)(encoded >>> 32)];
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public ChunkHolder.FullChunkStatus getChunkStatus() {
|
+ public FullChunkStatus getChunkStatus() {
|
||||||
+ return getCurrentChunkStatus(((long)CHUNK_STATUS_HANDLE.getVolatile((NewChunkHolder)this)));
|
+ return getCurrentChunkStatus(((long)CHUNK_STATUS_HANDLE.getVolatile((NewChunkHolder)this)));
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public boolean isEntityTickingReady() {
|
+ public boolean isEntityTickingReady() {
|
||||||
+ return this.getChunkStatus().isOrAfter(ChunkHolder.FullChunkStatus.ENTITY_TICKING);
|
+ return this.getChunkStatus().isOrAfter(FullChunkStatus.ENTITY_TICKING);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public boolean isTickingReady() {
|
+ public boolean isTickingReady() {
|
||||||
+ return this.getChunkStatus().isOrAfter(ChunkHolder.FullChunkStatus.TICKING);
|
+ return this.getChunkStatus().isOrAfter(FullChunkStatus.BLOCK_TICKING);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public boolean isFullChunkReady() {
|
+ public boolean isFullChunkReady() {
|
||||||
+ return this.getChunkStatus().isOrAfter(ChunkHolder.FullChunkStatus.BORDER);
|
+ return this.getChunkStatus().isOrAfter(FullChunkStatus.FULL);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ private static ChunkHolder.FullChunkStatus getStatusForBitset(final long bitset) {
|
+ private static FullChunkStatus getStatusForBitset(final long bitset) {
|
||||||
+ if (areNeighboursFullLoaded(bitset, 2)) {
|
+ if (areNeighboursFullLoaded(bitset, 2)) {
|
||||||
+ return ChunkHolder.FullChunkStatus.ENTITY_TICKING;
|
+ return FullChunkStatus.ENTITY_TICKING;
|
||||||
+ } else if (areNeighboursFullLoaded(bitset, 1)) {
|
+ } else if (areNeighboursFullLoaded(bitset, 1)) {
|
||||||
+ return ChunkHolder.FullChunkStatus.TICKING;
|
+ return FullChunkStatus.BLOCK_TICKING;
|
||||||
+ } else if (areNeighboursFullLoaded(bitset, 0)) {
|
+ } else if (areNeighboursFullLoaded(bitset, 0)) {
|
||||||
+ return ChunkHolder.FullChunkStatus.BORDER;
|
+ return FullChunkStatus.FULL;
|
||||||
+ } else {
|
+ } else {
|
||||||
+ return ChunkHolder.FullChunkStatus.INACCESSIBLE;
|
+ return FullChunkStatus.INACCESSIBLE;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ // note: only while updating ticket level, so holds ticket update lock + scheduling lock
|
+ // note: only while updating ticket level, so holds ticket update lock + scheduling lock
|
||||||
+ protected final boolean onTicketUpdate(final ChunkHolder.FullChunkStatus oldState, final ChunkHolder.FullChunkStatus newState) {
|
+ protected final boolean onTicketUpdate(final FullChunkStatus oldState, final FullChunkStatus newState) {
|
||||||
+ if (oldState == newState) {
|
+ if (oldState == newState) {
|
||||||
+ return false;
|
+ return false;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ // preserve border request after full status complete, as it does not set anything in the bitset
|
+ // preserve border request after full status complete, as it does not set anything in the bitset
|
||||||
+ ChunkHolder.FullChunkStatus byNeighbours = getStatusForBitset(this.fullNeighbourChunksLoadedBitset);
|
+ FullChunkStatus byNeighbours = getStatusForBitset(this.fullNeighbourChunksLoadedBitset);
|
||||||
+ if (byNeighbours == ChunkHolder.FullChunkStatus.INACCESSIBLE && newState.isOrAfter(ChunkHolder.FullChunkStatus.BORDER) && this.currentGenStatus == ChunkStatus.FULL) {
|
+ if (byNeighbours == FullChunkStatus.INACCESSIBLE && newState.isOrAfter(FullChunkStatus.FULL) && this.currentGenStatus == ChunkStatus.FULL) {
|
||||||
+ byNeighbours = ChunkHolder.FullChunkStatus.BORDER;
|
+ byNeighbours = FullChunkStatus.FULL;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ final ChunkHolder.FullChunkStatus toSet;
|
+ final FullChunkStatus toSet;
|
||||||
+
|
+
|
||||||
+ if (newState.isOrAfter(byNeighbours)) {
|
+ if (newState.isOrAfter(byNeighbours)) {
|
||||||
+ // must clamp to neighbours level, even though we have the ticket level
|
+ // must clamp to neighbours level, even though we have the ticket level
|
||||||
@ -12077,9 +12085,9 @@ index 0000000000000000000000000000000000000000..efc9b7a304f10b6a23a36cffb0a4aaea
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ protected final boolean onNeighbourChange(final long bitsetBefore, final long bitsetAfter) {
|
+ protected final boolean onNeighbourChange(final long bitsetBefore, final long bitsetAfter) {
|
||||||
+ ChunkHolder.FullChunkStatus oldState = getStatusForBitset(bitsetBefore);
|
+ FullChunkStatus oldState = getStatusForBitset(bitsetBefore);
|
||||||
+ ChunkHolder.FullChunkStatus newState = getStatusForBitset(bitsetAfter);
|
+ FullChunkStatus newState = getStatusForBitset(bitsetAfter);
|
||||||
+ final ChunkHolder.FullChunkStatus currStateTicketLevel = ChunkHolder.getFullChunkStatus(this.oldTicketLevel);
|
+ final FullChunkStatus currStateTicketLevel = ChunkHolder.getFullChunkStatus(this.oldTicketLevel);
|
||||||
+ if (oldState.isOrAfter(currStateTicketLevel)) {
|
+ if (oldState.isOrAfter(currStateTicketLevel)) {
|
||||||
+ oldState = currStateTicketLevel;
|
+ oldState = currStateTicketLevel;
|
||||||
+ }
|
+ }
|
||||||
@ -12087,8 +12095,8 @@ index 0000000000000000000000000000000000000000..efc9b7a304f10b6a23a36cffb0a4aaea
|
|||||||
+ newState = currStateTicketLevel;
|
+ newState = currStateTicketLevel;
|
||||||
+ }
|
+ }
|
||||||
+ // preserve border request after full status complete, as it does not set anything in the bitset
|
+ // preserve border request after full status complete, as it does not set anything in the bitset
|
||||||
+ if (newState == ChunkHolder.FullChunkStatus.INACCESSIBLE && currStateTicketLevel.isOrAfter(ChunkHolder.FullChunkStatus.BORDER) && this.currentGenStatus == ChunkStatus.FULL) {
|
+ if (newState == FullChunkStatus.INACCESSIBLE && currStateTicketLevel.isOrAfter(FullChunkStatus.FULL) && this.currentGenStatus == ChunkStatus.FULL) {
|
||||||
+ newState = ChunkHolder.FullChunkStatus.BORDER;
|
+ newState = FullChunkStatus.FULL;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (oldState == newState) {
|
+ if (oldState == newState) {
|
||||||
@ -12110,13 +12118,13 @@ index 0000000000000000000000000000000000000000..efc9b7a304f10b6a23a36cffb0a4aaea
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ private boolean queueBorderFullStatus(final boolean loaded, final List<NewChunkHolder> changedFullStatus) {
|
+ private boolean queueBorderFullStatus(final boolean loaded, final List<NewChunkHolder> changedFullStatus) {
|
||||||
+ final ChunkHolder.FullChunkStatus toStatus = loaded ? ChunkHolder.FullChunkStatus.BORDER : ChunkHolder.FullChunkStatus.INACCESSIBLE;
|
+ final FullChunkStatus toStatus = loaded ? FullChunkStatus.FULL : FullChunkStatus.INACCESSIBLE;
|
||||||
+
|
+
|
||||||
+ int failures = 0;
|
+ int failures = 0;
|
||||||
+ for (long curr = (long)CHUNK_STATUS_HANDLE.getVolatile((NewChunkHolder)this);;) {
|
+ for (long curr = (long)CHUNK_STATUS_HANDLE.getVolatile((NewChunkHolder)this);;) {
|
||||||
+ final ChunkHolder.FullChunkStatus currPending = getPendingChunkStatus(curr);
|
+ final FullChunkStatus currPending = getPendingChunkStatus(curr);
|
||||||
+ if (loaded && currPending != ChunkHolder.FullChunkStatus.INACCESSIBLE) {
|
+ if (loaded && currPending != FullChunkStatus.INACCESSIBLE) {
|
||||||
+ throw new IllegalStateException("Expected " + ChunkHolder.FullChunkStatus.INACCESSIBLE + " for pending, but got " + currPending);
|
+ throw new IllegalStateException("Expected " + FullChunkStatus.INACCESSIBLE + " for pending, but got " + currPending);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ final long update = (curr & ~PENDING_STATUS_MASK) | ((long)toStatus.ordinal() << 32);
|
+ final long update = (curr & ~PENDING_STATUS_MASK) | ((long)toStatus.ordinal() << 32);
|
||||||
@ -12153,7 +12161,7 @@ index 0000000000000000000000000000000000000000..efc9b7a304f10b6a23a36cffb0a4aaea
|
|||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ private ChunkHolder.FullChunkStatus updateCurrentState(final ChunkHolder.FullChunkStatus to) {
|
+ private FullChunkStatus updateCurrentState(final FullChunkStatus to) {
|
||||||
+ int failures = 0;
|
+ int failures = 0;
|
||||||
+ for (long curr = (long)CHUNK_STATUS_HANDLE.getVolatile((NewChunkHolder)this);;) {
|
+ for (long curr = (long)CHUNK_STATUS_HANDLE.getVolatile((NewChunkHolder)this);;) {
|
||||||
+ final long update = (curr & PENDING_STATUS_MASK) | (long)to.ordinal();
|
+ final long update = (curr & PENDING_STATUS_MASK) | (long)to.ordinal();
|
||||||
@ -12168,7 +12176,7 @@ index 0000000000000000000000000000000000000000..efc9b7a304f10b6a23a36cffb0a4aaea
|
|||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ private void changeEntityChunkStatus(final ChunkHolder.FullChunkStatus toStatus) {
|
+ private void changeEntityChunkStatus(final FullChunkStatus toStatus) {
|
||||||
+ this.world.getEntityLookup().chunkStatusChange(this.chunkX, this.chunkZ, toStatus);
|
+ this.world.getEntityLookup().chunkStatusChange(this.chunkX, this.chunkZ, toStatus);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -12211,10 +12219,10 @@ index 0000000000000000000000000000000000000000..efc9b7a304f10b6a23a36cffb0a4aaea
|
|||||||
+ try {
|
+ try {
|
||||||
+ for (;;) {
|
+ for (;;) {
|
||||||
+ final long currStateEncoded = (long)CHUNK_STATUS_HANDLE.getOpaque((NewChunkHolder)this);
|
+ final long currStateEncoded = (long)CHUNK_STATUS_HANDLE.getOpaque((NewChunkHolder)this);
|
||||||
+ final ChunkHolder.FullChunkStatus currState = getCurrentChunkStatus(currStateEncoded);
|
+ final FullChunkStatus currState = getCurrentChunkStatus(currStateEncoded);
|
||||||
+ ChunkHolder.FullChunkStatus nextState = getPendingChunkStatus(currStateEncoded);
|
+ FullChunkStatus nextState = getPendingChunkStatus(currStateEncoded);
|
||||||
+ if (currState == nextState) {
|
+ if (currState == nextState) {
|
||||||
+ if (nextState == ChunkHolder.FullChunkStatus.INACCESSIBLE) {
|
+ if (nextState == FullChunkStatus.INACCESSIBLE) {
|
||||||
+ this.scheduler.schedulingLock.lock();
|
+ this.scheduler.schedulingLock.lock();
|
||||||
+ try {
|
+ try {
|
||||||
+ this.checkUnload();
|
+ this.checkUnload();
|
||||||
@ -12235,47 +12243,47 @@ index 0000000000000000000000000000000000000000..efc9b7a304f10b6a23a36cffb0a4aaea
|
|||||||
+ // of the chunk system load callbacks are invoked
|
+ // of the chunk system load callbacks are invoked
|
||||||
+ if (nextState.isOrAfter(currState)) {
|
+ if (nextState.isOrAfter(currState)) {
|
||||||
+ // state upgrade
|
+ // state upgrade
|
||||||
+ if (!currState.isOrAfter(ChunkHolder.FullChunkStatus.BORDER) && nextState.isOrAfter(ChunkHolder.FullChunkStatus.BORDER)) {
|
+ if (!currState.isOrAfter(FullChunkStatus.FULL) && nextState.isOrAfter(FullChunkStatus.FULL)) {
|
||||||
+ nextState = this.updateCurrentState(ChunkHolder.FullChunkStatus.BORDER);
|
+ nextState = this.updateCurrentState(FullChunkStatus.FULL);
|
||||||
+ holderManager.ensureInAutosave(this);
|
+ holderManager.ensureInAutosave(this);
|
||||||
+ chunk.pushChunkIntoLoadedMap();
|
+ chunk.pushChunkIntoLoadedMap();
|
||||||
+ this.changeEntityChunkStatus(ChunkHolder.FullChunkStatus.BORDER);
|
+ this.changeEntityChunkStatus(FullChunkStatus.FULL);
|
||||||
+ chunk.onChunkLoad(this);
|
+ chunk.onChunkLoad(this);
|
||||||
+ this.onFullChunkLoadChange(true, changedFullStatus);
|
+ this.onFullChunkLoadChange(true, changedFullStatus);
|
||||||
+ this.completeFullStatusConsumers(ChunkHolder.FullChunkStatus.BORDER, chunk);
|
+ this.completeFullStatusConsumers(FullChunkStatus.FULL, chunk);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (!currState.isOrAfter(ChunkHolder.FullChunkStatus.TICKING) && nextState.isOrAfter(ChunkHolder.FullChunkStatus.TICKING)) {
|
+ if (!currState.isOrAfter(FullChunkStatus.BLOCK_TICKING) && nextState.isOrAfter(FullChunkStatus.BLOCK_TICKING)) {
|
||||||
+ nextState = this.updateCurrentState(ChunkHolder.FullChunkStatus.TICKING);
|
+ nextState = this.updateCurrentState(FullChunkStatus.BLOCK_TICKING);
|
||||||
+ this.changeEntityChunkStatus(ChunkHolder.FullChunkStatus.TICKING);
|
+ this.changeEntityChunkStatus(FullChunkStatus.BLOCK_TICKING);
|
||||||
+ chunk.onChunkTicking(this);
|
+ chunk.onChunkTicking(this);
|
||||||
+ this.completeFullStatusConsumers(ChunkHolder.FullChunkStatus.TICKING, chunk);
|
+ this.completeFullStatusConsumers(FullChunkStatus.BLOCK_TICKING, chunk);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (!currState.isOrAfter(ChunkHolder.FullChunkStatus.ENTITY_TICKING) && nextState.isOrAfter(ChunkHolder.FullChunkStatus.ENTITY_TICKING)) {
|
+ if (!currState.isOrAfter(FullChunkStatus.ENTITY_TICKING) && nextState.isOrAfter(FullChunkStatus.ENTITY_TICKING)) {
|
||||||
+ nextState = this.updateCurrentState(ChunkHolder.FullChunkStatus.ENTITY_TICKING);
|
+ nextState = this.updateCurrentState(FullChunkStatus.ENTITY_TICKING);
|
||||||
+ this.changeEntityChunkStatus(ChunkHolder.FullChunkStatus.ENTITY_TICKING);
|
+ this.changeEntityChunkStatus(FullChunkStatus.ENTITY_TICKING);
|
||||||
+ chunk.onChunkEntityTicking(this);
|
+ chunk.onChunkEntityTicking(this);
|
||||||
+ this.completeFullStatusConsumers(ChunkHolder.FullChunkStatus.ENTITY_TICKING, chunk);
|
+ this.completeFullStatusConsumers(FullChunkStatus.ENTITY_TICKING, chunk);
|
||||||
+ }
|
+ }
|
||||||
+ } else {
|
+ } else {
|
||||||
+ if (currState.isOrAfter(ChunkHolder.FullChunkStatus.ENTITY_TICKING) && !nextState.isOrAfter(ChunkHolder.FullChunkStatus.ENTITY_TICKING)) {
|
+ if (currState.isOrAfter(FullChunkStatus.ENTITY_TICKING) && !nextState.isOrAfter(FullChunkStatus.ENTITY_TICKING)) {
|
||||||
+ this.changeEntityChunkStatus(ChunkHolder.FullChunkStatus.TICKING);
|
+ this.changeEntityChunkStatus(FullChunkStatus.BLOCK_TICKING);
|
||||||
+ chunk.onChunkNotEntityTicking(this);
|
+ chunk.onChunkNotEntityTicking(this);
|
||||||
+ nextState = this.updateCurrentState(ChunkHolder.FullChunkStatus.TICKING);
|
+ nextState = this.updateCurrentState(FullChunkStatus.BLOCK_TICKING);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (currState.isOrAfter(ChunkHolder.FullChunkStatus.TICKING) && !nextState.isOrAfter(ChunkHolder.FullChunkStatus.TICKING)) {
|
+ if (currState.isOrAfter(FullChunkStatus.BLOCK_TICKING) && !nextState.isOrAfter(FullChunkStatus.BLOCK_TICKING)) {
|
||||||
+ this.changeEntityChunkStatus(ChunkHolder.FullChunkStatus.BORDER);
|
+ this.changeEntityChunkStatus(FullChunkStatus.FULL);
|
||||||
+ chunk.onChunkNotTicking(this);
|
+ chunk.onChunkNotTicking(this);
|
||||||
+ nextState = this.updateCurrentState(ChunkHolder.FullChunkStatus.BORDER);
|
+ nextState = this.updateCurrentState(FullChunkStatus.FULL);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (currState.isOrAfter(ChunkHolder.FullChunkStatus.BORDER) && !nextState.isOrAfter(ChunkHolder.FullChunkStatus.BORDER)) {
|
+ if (currState.isOrAfter(FullChunkStatus.FULL) && !nextState.isOrAfter(FullChunkStatus.FULL)) {
|
||||||
+ this.onFullChunkLoadChange(false, changedFullStatus);
|
+ this.onFullChunkLoadChange(false, changedFullStatus);
|
||||||
+ this.changeEntityChunkStatus(ChunkHolder.FullChunkStatus.INACCESSIBLE);
|
+ this.changeEntityChunkStatus(FullChunkStatus.INACCESSIBLE);
|
||||||
+ chunk.onChunkUnload(this);
|
+ chunk.onChunkUnload(this);
|
||||||
+ nextState = this.updateCurrentState(ChunkHolder.FullChunkStatus.INACCESSIBLE);
|
+ nextState = this.updateCurrentState(FullChunkStatus.INACCESSIBLE);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -12357,17 +12365,17 @@ index 0000000000000000000000000000000000000000..efc9b7a304f10b6a23a36cffb0a4aaea
|
|||||||
+ }, PrioritisedExecutor.Priority.HIGHEST);
|
+ }, PrioritisedExecutor.Priority.HIGHEST);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ private final Reference2ObjectOpenHashMap<ChunkHolder.FullChunkStatus, List<Consumer<LevelChunk>>> fullStatusWaiters = new Reference2ObjectOpenHashMap<>();
|
+ private final Reference2ObjectOpenHashMap<FullChunkStatus, List<Consumer<LevelChunk>>> fullStatusWaiters = new Reference2ObjectOpenHashMap<>();
|
||||||
+
|
+
|
||||||
+ void addFullStatusConsumer(final ChunkHolder.FullChunkStatus status, final Consumer<LevelChunk> consumer) {
|
+ void addFullStatusConsumer(final FullChunkStatus status, final Consumer<LevelChunk> consumer) {
|
||||||
+ this.fullStatusWaiters.computeIfAbsent(status, (final ChunkHolder.FullChunkStatus keyInMap) -> {
|
+ this.fullStatusWaiters.computeIfAbsent(status, (final FullChunkStatus keyInMap) -> {
|
||||||
+ return new ArrayList<>(4);
|
+ return new ArrayList<>(4);
|
||||||
+ }).add(consumer);
|
+ }).add(consumer);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ private void completeFullStatusConsumers(ChunkHolder.FullChunkStatus status, final LevelChunk chunk) {
|
+ private void completeFullStatusConsumers(FullChunkStatus status, final LevelChunk chunk) {
|
||||||
+ // need to tell future statuses to complete if cancelled
|
+ // need to tell future statuses to complete if cancelled
|
||||||
+ final ChunkHolder.FullChunkStatus max = CHUNK_STATUS_BY_ID[CHUNK_STATUS_BY_ID.length - 1];
|
+ final FullChunkStatus max = CHUNK_STATUS_BY_ID[CHUNK_STATUS_BY_ID.length - 1];
|
||||||
+
|
+
|
||||||
+ for (;;) {
|
+ for (;;) {
|
||||||
+ this.completeFullStatusConsumers0(status, chunk);
|
+ this.completeFullStatusConsumers0(status, chunk);
|
||||||
@ -12378,7 +12386,7 @@ index 0000000000000000000000000000000000000000..efc9b7a304f10b6a23a36cffb0a4aaea
|
|||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ private void completeFullStatusConsumers0(final ChunkHolder.FullChunkStatus status, final LevelChunk chunk) {
|
+ private void completeFullStatusConsumers0(final FullChunkStatus status, final LevelChunk chunk) {
|
||||||
+ final List<Consumer<LevelChunk>> consumers;
|
+ final List<Consumer<LevelChunk>> consumers;
|
||||||
+ consumers = this.fullStatusWaiters.remove(status);
|
+ consumers = this.fullStatusWaiters.remove(status);
|
||||||
+
|
+
|
||||||
@ -12525,7 +12533,7 @@ index 0000000000000000000000000000000000000000..efc9b7a304f10b6a23a36cffb0a4aaea
|
|||||||
+ this.lockPriority();
|
+ this.lockPriority();
|
||||||
+ // must use oldTicketLevel, we hold the schedule lock but not the ticket level lock
|
+ // must use oldTicketLevel, we hold the schedule lock but not the ticket level lock
|
||||||
+ // however, schedule lock needs to be held for ticket level callback, so we're fine here
|
+ // however, schedule lock needs to be held for ticket level callback, so we're fine here
|
||||||
+ if (ChunkHolder.getFullChunkStatus(this.oldTicketLevel).isOrAfter(ChunkHolder.FullChunkStatus.BORDER)) {
|
+ if (ChunkHolder.getFullChunkStatus(this.oldTicketLevel).isOrAfter(FullChunkStatus.FULL)) {
|
||||||
+ this.queueBorderFullStatus(true, changedLoadStatus);
|
+ this.queueBorderFullStatus(true, changedLoadStatus);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
@ -12884,8 +12892,8 @@ index 0000000000000000000000000000000000000000..efc9b7a304f10b6a23a36cffb0a4aaea
|
|||||||
+ final long chunkStatus = this.chunkStatus;
|
+ final long chunkStatus = this.chunkStatus;
|
||||||
+ final int fullChunkStatus = (int)chunkStatus;
|
+ final int fullChunkStatus = (int)chunkStatus;
|
||||||
+ final int pendingChunkStatus = (int)(chunkStatus >>> 32);
|
+ final int pendingChunkStatus = (int)(chunkStatus >>> 32);
|
||||||
+ final ChunkHolder.FullChunkStatus currentFullStatus = fullChunkStatus < 0 || fullChunkStatus >= CHUNK_STATUS_BY_ID.length ? null : CHUNK_STATUS_BY_ID[fullChunkStatus];
|
+ final FullChunkStatus currentFullStatus = fullChunkStatus < 0 || fullChunkStatus >= CHUNK_STATUS_BY_ID.length ? null : CHUNK_STATUS_BY_ID[fullChunkStatus];
|
||||||
+ final ChunkHolder.FullChunkStatus pendingFullStatus = pendingChunkStatus < 0 || pendingChunkStatus >= CHUNK_STATUS_BY_ID.length ? null : CHUNK_STATUS_BY_ID[pendingChunkStatus];
|
+ final FullChunkStatus pendingFullStatus = pendingChunkStatus < 0 || pendingChunkStatus >= CHUNK_STATUS_BY_ID.length ? null : CHUNK_STATUS_BY_ID[pendingChunkStatus];
|
||||||
+ return "NewChunkHolder{" +
|
+ return "NewChunkHolder{" +
|
||||||
+ "world=" + this.world.getWorld().getName() +
|
+ "world=" + this.world.getWorld().getName() +
|
||||||
+ ", chunkX=" + this.chunkX +
|
+ ", chunkX=" + this.chunkX +
|
||||||
@ -14509,10 +14517,10 @@ index d59885ee9c8b29d5bac34dce0597e345e5358c77..fc57850b80303fcade89ca95794f6391
|
|||||||
}
|
}
|
||||||
diff --git a/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java b/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
|
diff --git a/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java b/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..f597d65d56964297eeeed6c7e77703764178fee0
|
index 0000000000000000000000000000000000000000..ce449b7b6f615f2c8240e4207f06d4e54ae0083e
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
|
+++ b/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
|
||||||
@@ -0,0 +1,601 @@
|
@@ -0,0 +1,602 @@
|
||||||
+package io.papermc.paper.world;
|
+package io.papermc.paper.world;
|
||||||
+
|
+
|
||||||
+import com.destroystokyo.paper.util.maplist.EntityList;
|
+import com.destroystokyo.paper.util.maplist.EntityList;
|
||||||
@ -14522,6 +14530,7 @@ index 0000000000000000000000000000000000000000..f597d65d56964297eeeed6c7e7770376
|
|||||||
+import it.unimi.dsi.fastutil.objects.Reference2ObjectOpenHashMap;
|
+import it.unimi.dsi.fastutil.objects.Reference2ObjectOpenHashMap;
|
||||||
+import net.minecraft.nbt.CompoundTag;
|
+import net.minecraft.nbt.CompoundTag;
|
||||||
+import net.minecraft.server.level.ChunkHolder;
|
+import net.minecraft.server.level.ChunkHolder;
|
||||||
|
+import net.minecraft.server.level.FullChunkStatus;
|
||||||
+import net.minecraft.server.level.ServerLevel;
|
+import net.minecraft.server.level.ServerLevel;
|
||||||
+import net.minecraft.util.Mth;
|
+import net.minecraft.util.Mth;
|
||||||
+import net.minecraft.world.entity.Entity;
|
+import net.minecraft.world.entity.Entity;
|
||||||
@ -14552,7 +14561,7 @@ index 0000000000000000000000000000000000000000..f597d65d56964297eeeed6c7e7770376
|
|||||||
+ protected final Reference2ObjectOpenHashMap<Class<? extends Entity>, EntityCollectionBySection> entitiesByClass;
|
+ protected final Reference2ObjectOpenHashMap<Class<? extends Entity>, EntityCollectionBySection> entitiesByClass;
|
||||||
+ protected final EntityList entities = new EntityList();
|
+ protected final EntityList entities = new EntityList();
|
||||||
+
|
+
|
||||||
+ public ChunkHolder.FullChunkStatus status;
|
+ public FullChunkStatus status;
|
||||||
+
|
+
|
||||||
+ protected boolean isTransient;
|
+ protected boolean isTransient;
|
||||||
+
|
+
|
||||||
@ -14566,7 +14575,7 @@ index 0000000000000000000000000000000000000000..f597d65d56964297eeeed6c7e7770376
|
|||||||
+
|
+
|
||||||
+ // TODO implement container search optimisations
|
+ // TODO implement container search optimisations
|
||||||
+
|
+
|
||||||
+ public ChunkEntitySlices(final ServerLevel world, final int chunkX, final int chunkZ, final ChunkHolder.FullChunkStatus status,
|
+ public ChunkEntitySlices(final ServerLevel world, final int chunkX, final int chunkZ, final FullChunkStatus status,
|
||||||
+ final int minSection, final int maxSection) { // inclusive, inclusive
|
+ final int minSection, final int maxSection) { // inclusive, inclusive
|
||||||
+ this.minSection = minSection;
|
+ this.minSection = minSection;
|
||||||
+ this.maxSection = maxSection;
|
+ this.maxSection = maxSection;
|
||||||
@ -14694,7 +14703,7 @@ index 0000000000000000000000000000000000000000..f597d65d56964297eeeed6c7e7770376
|
|||||||
+ this.preventStatusUpdates = prev;
|
+ this.preventStatusUpdates = prev;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public void updateStatus(final ChunkHolder.FullChunkStatus status, final EntityLookup lookup) {
|
+ public void updateStatus(final FullChunkStatus status, final EntityLookup lookup) {
|
||||||
+ this.status = status;
|
+ this.status = status;
|
||||||
+
|
+
|
||||||
+ final Entity[] entities = this.entities.getRawData();
|
+ final Entity[] entities = this.entities.getRawData();
|
||||||
@ -15382,7 +15391,7 @@ index 51eac8b7177db66c005e4eaca689cf96d10edeaa..4f55f04812fe0306acfc4be45189f1f6
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
index 4620e64d8eb81520b75fbfbc64603e5887c7b016..4b87f5d899e5ac033d78ccdbca21c9c50c46dcef 100644
|
index 4620e64d8eb81520b75fbfbc64603e5887c7b016..84e4aea3d44cd7d5405ffc970a0568337ee5b0a7 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
@@ -48,17 +48,15 @@ public class ChunkHolder {
|
@@ -48,17 +48,15 @@ public class ChunkHolder {
|
||||||
@ -15391,7 +15400,7 @@ index 4620e64d8eb81520b75fbfbc64603e5887c7b016..4b87f5d899e5ac033d78ccdbca21c9c5
|
|||||||
private static final List<ChunkStatus> CHUNK_STATUSES = ChunkStatus.getStatusList();
|
private static final List<ChunkStatus> CHUNK_STATUSES = ChunkStatus.getStatusList();
|
||||||
- private final AtomicReferenceArray<CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>>> futures;
|
- private final AtomicReferenceArray<CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>>> futures;
|
||||||
+ // Paper - rewrite chunk system
|
+ // Paper - rewrite chunk system
|
||||||
+ private static final ChunkHolder.FullChunkStatus[] FULL_CHUNK_STATUSES = ChunkHolder.FullChunkStatus.values();
|
+ private static final FullChunkStatus[] FULL_CHUNK_STATUSES = FullChunkStatus.values();
|
||||||
+ private static final int BLOCKS_BEFORE_RESEND_FUDGE = 64;
|
+ private static final int BLOCKS_BEFORE_RESEND_FUDGE = 64;
|
||||||
+ // Paper - rewrite chunk system
|
+ // Paper - rewrite chunk system
|
||||||
private final LevelHeightAccessor levelHeightAccessor;
|
private final LevelHeightAccessor levelHeightAccessor;
|
||||||
@ -15792,8 +15801,8 @@ index 4620e64d8eb81520b75fbfbc64603e5887c7b016..4b87f5d899e5ac033d78ccdbca21c9c5
|
|||||||
|
|
||||||
- public void setTicketLevel(int level) {
|
- public void setTicketLevel(int level) {
|
||||||
- this.ticketLevel = level;
|
- this.ticketLevel = level;
|
||||||
+ public static ChunkHolder.FullChunkStatus getFullChunkStatus(int distance) {
|
+ public static FullChunkStatus getFullChunkStatus(int distance) {
|
||||||
+ return ChunkHolder.FULL_CHUNK_STATUSES[Mth.clamp(33 - distance + 1, 0, ChunkHolder.FULL_CHUNK_STATUSES.length - 1)];
|
+ return ChunkHolder.FULL_CHUNK_STATUSES[net.minecraft.util.Mth.clamp(33 - distance + 1, 0, ChunkHolder.FULL_CHUNK_STATUSES.length - 1)];
|
||||||
}
|
}
|
||||||
|
|
||||||
- private void scheduleFullChunkPromotion(ChunkMap playerchunkmap, CompletableFuture<Either<LevelChunk, ChunkHolder.ChunkLoadingFailure>> completablefuture, Executor executor, FullChunkStatus fullchunkstatus) {
|
- private void scheduleFullChunkPromotion(ChunkMap playerchunkmap, CompletableFuture<Either<LevelChunk, ChunkHolder.ChunkLoadingFailure>> completablefuture, Executor executor, FullChunkStatus fullchunkstatus) {
|
||||||
@ -18728,7 +18737,7 @@ index 12e72ad737b1219fcdf88d344d41621d9fd5feec..e0bfeebeaac1aaea64bc07cdfdf7790e
|
|||||||
if (flag1) {
|
if (flag1) {
|
||||||
++this.converted;
|
++this.converted;
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index f668a80c6bff67bf766207985c1af73f09e1bd1c..7f6a90fab14d6880f2784e1c62eb2f3c9da404b5 100644
|
index f668a80c6bff67bf766207985c1af73f09e1bd1c..eac86eb8b1b0175c0d84230176cf5fffb23a7ea8 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -327,6 +327,58 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -327,6 +327,58 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
@ -18778,7 +18787,7 @@ index f668a80c6bff67bf766207985c1af73f09e1bd1c..7f6a90fab14d6880f2784e1c62eb2f3c
|
|||||||
+ return this.hardCollides;
|
+ return this.hardCollides;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public net.minecraft.server.level.ChunkHolder.FullChunkStatus chunkStatus;
|
+ public net.minecraft.server.level.FullChunkStatus chunkStatus;
|
||||||
+
|
+
|
||||||
+ public int sectionX = Integer.MIN_VALUE;
|
+ public int sectionX = Integer.MIN_VALUE;
|
||||||
+ public int sectionY = Integer.MIN_VALUE;
|
+ public int sectionY = Integer.MIN_VALUE;
|
||||||
|
@ -25,7 +25,7 @@ index 62a95a0fac59683948f34b202e6e3859b6652d6d..d47e99ac96e622296d045cfcf93b53dd
|
|||||||
|
|
||||||
public void onTrackingEnd(Entity entity) {
|
public void onTrackingEnd(Entity entity) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 7f6a90fab14d6880f2784e1c62eb2f3c9da404b5..193b466e5dc52b9ecc878c4a680f88b8ce05e632 100644
|
index eac86eb8b1b0175c0d84230176cf5fffb23a7ea8..4a5bb3615797ac03050cd1dc469612b24288e995 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -312,7 +312,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -312,7 +312,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Configurable top of nether void damage
|
|||||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 193b466e5dc52b9ecc878c4a680f88b8ce05e632..3088cdbb55b3054394fd3405797539f58a46f70c 100644
|
index 4a5bb3615797ac03050cd1dc469612b24288e995..e48e42d7029dcb45a999433542719cfdd353d6fe 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -715,7 +715,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -715,7 +715,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add configurable portal search radius
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 3088cdbb55b3054394fd3405797539f58a46f70c..756b8be27488c81172fe05fa0361ef3866f99bee 100644
|
index e48e42d7029dcb45a999433542719cfdd353d6fe..5a72cd0ac9073b29db532f3b60d8e1ac2a3f3932 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -3174,7 +3174,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3174,7 +3174,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -11,7 +11,7 @@ So avoid looking up scoreboards and short circuit to the "not on a team"
|
|||||||
logic which is most likely to be true.
|
logic which is most likely to be true.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 756b8be27488c81172fe05fa0361ef3866f99bee..194c0f9e8b537d415d7cdedf9cd5d4870b60fb08 100644
|
index 5a72cd0ac9073b29db532f3b60d8e1ac2a3f3932..a42e71e2dde3c5dd2d7864f58cb9901fd1d5b6b7 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -2805,6 +2805,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2805,6 +2805,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Use a Shared Random for Entities
|
|||||||
Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created.
|
Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 194c0f9e8b537d415d7cdedf9cd5d4870b60fb08..3f8b0124e5c2a01f1cf3a344b8dd4075817cb001 100644
|
index a42e71e2dde3c5dd2d7864f58cb9901fd1d5b6b7..324d8f5697d840291fb3052b59a8c4620f5ca2ab 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -162,6 +162,79 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -162,6 +162,79 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -490,7 +490,7 @@ index 0000000000000000000000000000000000000000..9cfa5d36a6991067a3866e0d437749fa
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 3f8b0124e5c2a01f1cf3a344b8dd4075817cb001..f331c9ff4cc341c981515210d3f4bd92faa8fdc9 100644
|
index 324d8f5697d840291fb3052b59a8c4620f5ca2ab..a47fca185b839a4ffb7070fcd436c03319ce5bcd 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -235,6 +235,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -235,6 +235,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Don't allow entities to ride themselves - #572
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index f331c9ff4cc341c981515210d3f4bd92faa8fdc9..9dcdfeaa4be508a5f59a0fae54494e743e13caf7 100644
|
index a47fca185b839a4ffb7070fcd436c03319ce5bcd..37ee25336b180e3830b8cfe2aa374ddd1b766a37 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -2537,6 +2537,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2537,6 +2537,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -12,7 +12,7 @@ just as it does in Vanilla, but entity pushing logic will be capped.
|
|||||||
You can set this to 0 to disable collisions.
|
You can set this to 0 to disable collisions.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 9dcdfeaa4be508a5f59a0fae54494e743e13caf7..d0d4e1e24aa518a258bdc66046ff44f03649ee84 100644
|
index 37ee25336b180e3830b8cfe2aa374ddd1b766a37..b0156ae16f6828a4a0f4320a01d6dd47ab09058f 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -387,6 +387,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -387,6 +387,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Entity#fromMobSpawner()
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index d0d4e1e24aa518a258bdc66046ff44f03649ee84..68db2023ae7cc07ffbee0aee05f010991c2167ad 100644
|
index b0156ae16f6828a4a0f4320a01d6dd47ab09058f..f9b795a4fe2b7e1802c2fc6c7f8905d787ccc600 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -388,6 +388,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -388,6 +388,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -9,7 +9,7 @@ Co-authored-by: aerulion <aerulion@gmail.com>
|
|||||||
This event is called when an entity receives knockback by another entity.
|
This event is called when an entity receives knockback by another entity.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 68db2023ae7cc07ffbee0aee05f010991c2167ad..46658e1a607af5831caa4b61b1a7e0434e8ab603 100644
|
index f9b795a4fe2b7e1802c2fc6c7f8905d787ccc600..88ae93a011b46d59bb731195ac607c1a17cfdfa9 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -1894,8 +1894,17 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -1894,8 +1894,17 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] add more information to Entity.toString()
|
|||||||
UUID, ticks lived, valid, dead
|
UUID, ticks lived, valid, dead
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 46658e1a607af5831caa4b61b1a7e0434e8ab603..5887ddef705e8da4154311a0e1b44f8a80e0c079 100644
|
index 88ae93a011b46d59bb731195ac607c1a17cfdfa9..15ad72d1cf64bd65f0e38562937c8fede5d6a054 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -3148,7 +3148,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3148,7 +3148,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -72,7 +72,7 @@ index 0dd9b622f652cc67e365032a948df4c40c315a80..203dcc314b20a427a827eabc1713dc3a
|
|||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 5887ddef705e8da4154311a0e1b44f8a80e0c079..dd2d79f12f3a9e108da360a818ad87846d6326d7 100644
|
index 15ad72d1cf64bd65f0e38562937c8fede5d6a054..040ffbaa7c7f5b05e2af5a32f28cc943526fb1b0 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -238,6 +238,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -238,6 +238,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -20,7 +20,7 @@ this is going to be the best soultion all around.
|
|||||||
Improvements/suggestions welcome!
|
Improvements/suggestions welcome!
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index dd2d79f12f3a9e108da360a818ad87846d6326d7..90de2e4e398c8454ad02f95fcbc303c9ab98c9d8 100644
|
index 040ffbaa7c7f5b05e2af5a32f28cc943526fb1b0..8e08e7989fe6b249dfb55c2180fd6f79576f5b72 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -2542,11 +2542,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2542,11 +2542,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -47,7 +47,7 @@ index 13d19946c5051ec876698626dcea18c28e47ff19..110cb6ca8abe4fa1b07dc69004cd4377
|
|||||||
});
|
});
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 90de2e4e398c8454ad02f95fcbc303c9ab98c9d8..2d7b8dcd5db2ac32d398d59bca479dafe002e671 100644
|
index 8e08e7989fe6b249dfb55c2180fd6f79576f5b72..37c2b12ae045847dea05cda9c6790018d4011fd2 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -234,6 +234,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -234,6 +234,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -33,10 +33,10 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA
|
|||||||
It is recommended you regenerate the entities, as these were legit entities, and deserve your love.
|
It is recommended you regenerate the entities, as these were legit entities, and deserve your love.
|
||||||
|
|
||||||
diff --git a/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java b/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java
|
diff --git a/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java b/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java
|
||||||
index 97edd4e8d3524c839a1765b6515deacae112ff4b..1f72755124302fc3f6b5685b85ad9d44bc8010e8 100644
|
index 8f7bf1f0400aeab8b7801d113d244d0716c5eb84..fccb8d7a99bef076838ebefa233f2f00a1364c30 100644
|
||||||
--- a/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java
|
--- a/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java
|
||||||
+++ b/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java
|
+++ b/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java
|
||||||
@@ -73,7 +73,17 @@ public final class ChunkSystem {
|
@@ -74,7 +74,17 @@ public final class ChunkSystem {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void onEntityPreAdd(final ServerLevel level, final Entity entity) {
|
public static void onEntityPreAdd(final ServerLevel level, final Entity entity) {
|
||||||
|
@ -112,7 +112,7 @@ index 15fdb6d6307bad251be9272d44bea9fbad90e55f..826634d50d8d537b01c1cfa545e82c92
|
|||||||
} else {
|
} else {
|
||||||
passenger.stopRiding();
|
passenger.stopRiding();
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 2d7b8dcd5db2ac32d398d59bca479dafe002e671..5220fd92c0cf84a6b4f233561eb7447027079319 100644
|
index 37c2b12ae045847dea05cda9c6790018d4011fd2..631be6012d0fd7a5a52910aba64c03c68027d9c0 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -390,6 +390,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -390,6 +390,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -13,7 +13,7 @@ Quickly loading the exact world spawn chunk before searching the
|
|||||||
heightmap resolves the issue without having to load all spawn chunks.
|
heightmap resolves the issue without having to load all spawn chunks.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 5220fd92c0cf84a6b4f233561eb7447027079319..714d724a9a1c3c4f915dc5f5882be1dc6fecd404 100644
|
index 631be6012d0fd7a5a52910aba64c03c68027d9c0..9169a388f87bcbd8fd99235fe16c1ba26f9ace33 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -3353,6 +3353,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3353,6 +3353,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 714d724a9a1c3c4f915dc5f5882be1dc6fecd404..ec2d15356774b34bbc6d9eb9c5b2c085e27848ae 100644
|
index 9169a388f87bcbd8fd99235fe16c1ba26f9ace33..4016a25357d59a8b8a6cc7e098d050aee7cc9a6c 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -392,6 +392,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -392,6 +392,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -26,7 +26,7 @@ index 9bfbd2ca9d70ac25fa86e35217289cbc9f09c199..16982a16639a07e31456aa1e27c1058f
|
|||||||
entityplayer1.setPos(entityplayer1.getX(), entityplayer1.getY() + 1.0D, entityplayer1.getZ());
|
entityplayer1.setPos(entityplayer1.getX(), entityplayer1.getY() + 1.0D, entityplayer1.getZ());
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index ec2d15356774b34bbc6d9eb9c5b2c085e27848ae..3a652296716a327943c334d10fd52a086250c75f 100644
|
index 4016a25357d59a8b8a6cc7e098d050aee7cc9a6c..9d59bf4b66b66e73360ce20949f0bfacaf025760 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -237,6 +237,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -237,6 +237,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -7,7 +7,7 @@ The code following this has better support for null worlds to move
|
|||||||
them back to the world spawn.
|
them back to the world spawn.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 3a652296716a327943c334d10fd52a086250c75f..32aa93c30ef64a1bfdadec9ff79473dd9eac47dd 100644
|
index 9d59bf4b66b66e73360ce20949f0bfacaf025760..0c755d9e594a95b60253f6f720d41ec9f398e9f4 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -2319,9 +2319,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2319,9 +2319,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -16,7 +16,7 @@ So even if something NEW comes up, it would be impossible to drop the
|
|||||||
same item twice because the source was destroyed.
|
same item twice because the source was destroyed.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 32aa93c30ef64a1bfdadec9ff79473dd9eac47dd..6854c5a07f1f899aabe58bf33b2def2762678d23 100644
|
index 0c755d9e594a95b60253f6f720d41ec9f398e9f4..caeb6896cc2e297e43d7161bd7bbde1222fc4480 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -2449,11 +2449,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2449,11 +2449,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Ensure Entity AABB's are never invalid
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 6854c5a07f1f899aabe58bf33b2def2762678d23..324c205f0e895511034c1f985863a87e0975a272 100644
|
index caeb6896cc2e297e43d7161bd7bbde1222fc4480..4ac82c68294fce60079b4d3a6eddda7d26d3ce86 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -688,8 +688,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -688,8 +688,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -31,7 +31,7 @@ index 600758b91ed8197ef615368e1ef5315dfa9666c6..e178effe00488139a250937a17144f77
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 324c205f0e895511034c1f985863a87e0975a272..0dd174071f9ef9412a9b4dc5af9aefaa581ec46d 100644
|
index 4ac82c68294fce60079b4d3a6eddda7d26d3ce86..6bf424563eb27023a4a489d5b8d0a8d8895726a0 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -158,6 +158,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -158,6 +158,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 0dd174071f9ef9412a9b4dc5af9aefaa581ec46d..b2cfd1e59f5f8fe81a8bdfd1a1891420c2bc778f 100644
|
index 6bf424563eb27023a4a489d5b8d0a8d8895726a0..ef8073268fb99f12a93000f8e475aeaa5b21a8d2 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -4411,4 +4411,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -4411,4 +4411,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Entity#isTicking
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index b2cfd1e59f5f8fe81a8bdfd1a1891420c2bc778f..e92c817cbe7d45a1f000f3365131995b368744e3 100644
|
index ef8073268fb99f12a93000f8e475aeaa5b21a8d2..0e2330f70900c6b98b3bfecf8e2be6f8788dbcf0 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -4416,5 +4416,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -4416,5 +4416,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Climbing should not bypass cramming gamerule
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index e92c817cbe7d45a1f000f3365131995b368744e3..31f47c6edbed52d31eba0d51b39bdb4c89cfffc9 100644
|
index 0e2330f70900c6b98b3bfecf8e2be6f8788dbcf0..dbe9223233fdd6b3a2d3f03ce0ca7811983508ea 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -2016,6 +2016,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2016,6 +2016,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -28,7 +28,7 @@ index 5ca3ad7b3d7606accd0a58b3c708fadb349608f7..4b6e0fe2fabcc55007fd8979e81f66df
|
|||||||
|
|
||||||
public Vec3 decode(long x, long y, long z) {
|
public Vec3 decode(long x, long y, long z) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 31f47c6edbed52d31eba0d51b39bdb4c89cfffc9..95517820247467e21e503347310a3c44480ec63c 100644
|
index dbe9223233fdd6b3a2d3f03ce0ca7811983508ea..04a67c91a65fa0b4d1680e18b4b88e18e74f8da1 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -4199,6 +4199,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -4199,6 +4199,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Collision option for requiring a player participant
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 95517820247467e21e503347310a3c44480ec63c..56a7cca5ac9e7f1b600efaf6f23e40903bf741cc 100644
|
index 04a67c91a65fa0b4d1680e18b4b88e18e74f8da1..f1d5f4d1d3b699e91c664462ccf554c7e4ce4b0b 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -1886,6 +1886,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -1886,6 +1886,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -11,7 +11,7 @@ Move the tick logic into the post tick, where portaling was
|
|||||||
designed to happen in the first place.
|
designed to happen in the first place.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 56a7cca5ac9e7f1b600efaf6f23e40903bf741cc..b15fed51ee86290cb1e5bbb58c3ad2dc80c0cb08 100644
|
index f1d5f4d1d3b699e91c664462ccf554c7e4ce4b0b..814955a922af1a9bd979d9f62c027f3883bcec42 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -482,6 +482,36 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -482,6 +482,36 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Optimize indirect passenger iteration
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index b15fed51ee86290cb1e5bbb58c3ad2dc80c0cb08..ed58ede6a929ec635e01d91cec04972b50c5c04f 100644
|
index 814955a922af1a9bd979d9f62c027f3883bcec42..90b9ae45baf10eef998df4dbef3d8f328aa4ae04 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -3860,20 +3860,34 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3860,20 +3860,34 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add back EntityPortalExitEvent
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index ed58ede6a929ec635e01d91cec04972b50c5c04f..4978e5779edd7bc66e297bca89a87b9f3b3f991f 100644
|
index 90b9ae45baf10eef998df4dbef3d8f328aa4ae04..dc96497fd06be1ba4f7b154db4832014fd64ad84 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -3307,6 +3307,23 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3307,6 +3307,23 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add Raw Byte Entity Serialization
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 4978e5779edd7bc66e297bca89a87b9f3b3f991f..fe750fd202f9a2a02f07752a11b1a4a8368afa5e 100644
|
index dc96497fd06be1ba4f7b154db4832014fd64ad84..81996be21aeaaf390dd8d5a7969f56c200c66c75 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -2105,6 +2105,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2105,6 +2105,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Optimize anyPlayerCloseEnoughForSpawning to use distance maps
|
|||||||
Use a distance map to find the players in range quickly
|
Use a distance map to find the players in range quickly
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
index 4b87f5d899e5ac033d78ccdbca21c9c50c46dcef..b705545ecaef9203ef2ff067ed947ad4aa86dc89 100644
|
index 84e4aea3d44cd7d5405ffc970a0568337ee5b0a7..e7c81056e9f4da0f89cf411afd446444bb40958c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
@@ -86,16 +86,29 @@ public class ChunkHolder {
|
@@ -86,16 +86,29 @@ public class ChunkHolder {
|
||||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Optimise chunk tick iteration
|
|||||||
Use a dedicated list of entity ticking chunks to reduce the cost
|
Use a dedicated list of entity ticking chunks to reduce the cost
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
index b705545ecaef9203ef2ff067ed947ad4aa86dc89..3914fae62d3e0c0a9aeb8fd2bd48e76889c25a3a 100644
|
index e7c81056e9f4da0f89cf411afd446444bb40958c..ec0419e2d895d08d4ba069c98f994839d9da6a05 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
@@ -91,6 +91,11 @@ public class ChunkHolder {
|
@@ -91,6 +91,11 @@ public class ChunkHolder {
|
||||||
|
@ -122,7 +122,7 @@ index 418bf659d31c5810d786064a76779cfa39943020..f8bcf1239c18a6334936cec483f2ae31
|
|||||||
|
|
||||||
private void tickPassenger(Entity vehicle, Entity passenger) {
|
private void tickPassenger(Entity vehicle, Entity passenger) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index fe750fd202f9a2a02f07752a11b1a4a8368afa5e..6b428686941a7fd6644ca1d08ca14e8bb3cef54b 100644
|
index 81996be21aeaaf390dd8d5a7969f56c200c66c75..4652f5b25bab9d6f44e1481aea47cf42fe381a07 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -991,7 +991,42 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -991,7 +991,42 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -19,10 +19,10 @@ index efbf77024d235d8af9f7efc938c17afd76a51b0c..670dcfa32d003870091b75937f1603a5
|
|||||||
public static final Timing midTickChunkTasks = Timings.ofSafe("Mid Tick Chunk Tasks");
|
public static final Timing midTickChunkTasks = Timings.ofSafe("Mid Tick Chunk Tasks");
|
||||||
|
|
||||||
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
||||||
index 718c1dd7b52fb9a501d552fdbcb3f9ff79d127d8..3ea7a4b8de338610399d5fe4ff6cf07251916448 100644
|
index 4054bf71486734d722a6a3c7b0b4638188798609..ae0c01539e068e2cc851d2ad52baccf5ebc9545f 100644
|
||||||
--- a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
--- a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
||||||
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
||||||
@@ -1080,7 +1080,9 @@ public final class ChunkHolderManager {
|
@@ -1082,7 +1082,9 @@ public final class ChunkHolderManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean processTicketUpdates() {
|
public boolean processTicketUpdates() {
|
||||||
|
@ -9,7 +9,7 @@ since the penalty of a map lookup could outweigh the benefits of
|
|||||||
searching less players (as it basically did in the outside range patch).
|
searching less players (as it basically did in the outside range patch).
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
index 3914fae62d3e0c0a9aeb8fd2bd48e76889c25a3a..25f983442b844465bde333131972d15df8e14415 100644
|
index ec0419e2d895d08d4ba069c98f994839d9da6a05..ed6a7cd6874e6692c60c5faedd2a86ef9c9425ed 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
@@ -96,6 +96,12 @@ public class ChunkHolder {
|
@@ -96,6 +96,12 @@ public class ChunkHolder {
|
||||||
|
@ -8,7 +8,7 @@ This is because bukkit uses a separate head rotation field for yaw.
|
|||||||
This issue only applies to players.
|
This issue only applies to players.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 6b428686941a7fd6644ca1d08ca14e8bb3cef54b..6349845508772092ac91919063a97c6d605d2a64 100644
|
index 4652f5b25bab9d6f44e1481aea47cf42fe381a07..8ec9177c328695932d7e768f3a6d8dab736f4f32 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -1870,6 +1870,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -1870,6 +1870,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] don't attempt to teleport dead entities
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 6349845508772092ac91919063a97c6d605d2a64..19fe9bc6f4eafb18f8f215a24d8bcd52627cabf0 100644
|
index 8ec9177c328695932d7e768f3a6d8dab736f4f32..a3d13ab12fecee4b110f1018c8614ed1de81fe35 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -754,7 +754,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -754,7 +754,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -1215,7 +1215,7 @@ index 5f957a28e9d30144f724ebdc581d5f0b80bf6dc1..23ab7960120c1e2a76880f634787a089
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 19fe9bc6f4eafb18f8f215a24d8bcd52627cabf0..84686bb4938d40771a578b475d34b2528bd4fadf 100644
|
index a3d13ab12fecee4b110f1018c8614ed1de81fe35..22f43e41b0df81097c241606c7b76586134b8eac 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -1177,9 +1177,44 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -1177,9 +1177,44 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Forward CraftEntity in teleport command
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 84686bb4938d40771a578b475d34b2528bd4fadf..70b9ce108506b636fe33885664806ba8313d15fc 100644
|
index 22f43e41b0df81097c241606c7b76586134b8eac..539f90c550b48b868e926249b1c19902cec11718 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -3422,6 +3422,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3422,6 +3422,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Freeze Tick Lock API
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 70b9ce108506b636fe33885664806ba8313d15fc..b57e6a0698f7e227a398c10a5fbaf28a30d8f4fc 100644
|
index 539f90c550b48b868e926249b1c19902cec11718..0a898383cebd1a795956bbe96d6c21f08e9a8d8c 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -401,6 +401,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -401,6 +401,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Ensure entity passenger world matches ridden entity
|
|||||||
Bad plugins doing this would cause some obvious problems...
|
Bad plugins doing this would cause some obvious problems...
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index b57e6a0698f7e227a398c10a5fbaf28a30d8f4fc..eedc3a591d2bce0b5793b2388be92ecb4867b246 100644
|
index 0a898383cebd1a795956bbe96d6c21f08e9a8d8c..b6be958178b4eb525f00a962c932b2d03095ebf5 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -2811,6 +2811,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2811,6 +2811,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Guard against invalid entity positions
|
|||||||
Anything not finite should be blocked and logged
|
Anything not finite should be blocked and logged
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index eedc3a591d2bce0b5793b2388be92ecb4867b246..128b3d63ca4d2d373dc988d84174da9c9f180e59 100644
|
index b6be958178b4eb525f00a962c932b2d03095ebf5..ad6ed96c734bcbd0d03308b43055979378389aea 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -4427,11 +4427,33 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -4427,11 +4427,33 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Prevent entity loading causing async lookups
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 128b3d63ca4d2d373dc988d84174da9c9f180e59..ebe74938dced87288339b6b08e2aebed8e448b15 100644
|
index ad6ed96c734bcbd0d03308b43055979378389aea..ed3bfdeaff6a2004cf5e86c1bf9b2088315eabd1 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -763,6 +763,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -763,6 +763,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add various missing EntityDropItemEvent calls
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index ebe74938dced87288339b6b08e2aebed8e448b15..44821989e2a21de518583ddad21bfbd896128fe4 100644
|
index ed3bfdeaff6a2004cf5e86c1bf9b2088315eabd1..3d850f2d464f2ee163d4944474bf95ea4bd61ef9 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -2644,6 +2644,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2644,6 +2644,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityPortalReadyEvent
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 44821989e2a21de518583ddad21bfbd896128fe4..26f339bc8178ed6ced41a1d7a3a0317200c52cb2 100644
|
index 3d850f2d464f2ee163d4944474bf95ea4bd61ef9..43b2e3d5687e6aa965d33633162ff1c6bff8cc03 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -3000,6 +3000,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3000,6 +3000,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Fix EntityCombustEvent cancellation cant fully prevent
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 26f339bc8178ed6ced41a1d7a3a0317200c52cb2..db17a3b2dcd051b533ca2d5e9ebc081990282daf 100644
|
index 43b2e3d5687e6aa965d33633162ff1c6bff8cc03..92186ea446c42cbbc8c844f14cee32602c92828b 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -3275,6 +3275,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3275,6 +3275,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Player Entity Tracking Events
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index db17a3b2dcd051b533ca2d5e9ebc081990282daf..bac69ebae072925973f2c1c5cc9f5e1de144dd82 100644
|
index 92186ea446c42cbbc8c844f14cee32602c92828b..5e75aea514a0311d3a8b7cf830a20b3705957b81 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -3997,9 +3997,21 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3997,9 +3997,21 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Improve PortalEvents
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index bac69ebae072925973f2c1c5cc9f5e1de144dd82..dd7d0af819e2a3bf6941bbe240e99e76bfe5fcdb 100644
|
index 5e75aea514a0311d3a8b7cf830a20b3705957b81..90d91ee354a995f07cb65d4c3f386f35254f2a7e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -3653,7 +3653,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3653,7 +3653,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add config option for spider worldborder climbing
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index dd7d0af819e2a3bf6941bbe240e99e76bfe5fcdb..0be84922c1cf73075f210da511f238acda7be6a0 100644
|
index 90d91ee354a995f07cb65d4c3f386f35254f2a7e..8e33cc53b1c68fc4b97ae86a142c95c25578e1b5 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -402,6 +402,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -402,6 +402,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Expose pre-collision moving velocity to
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 0be84922c1cf73075f210da511f238acda7be6a0..8e5dacfcf4e8a1cb20070d67c7b38a1cc3ccc9bb 100644
|
index 8e33cc53b1c68fc4b97ae86a142c95c25578e1b5..660e19896dd24f4b8c065b5fc6edece4cd5ff801 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -1123,7 +1123,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -1123,7 +1123,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
@ -9,7 +9,7 @@ Previously, after the entity reloaded, Projectile#getShooter
|
|||||||
would return null, while the entity still had an owner.
|
would return null, while the entity still had an owner.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 8e5dacfcf4e8a1cb20070d67c7b38a1cc3ccc9bb..1b04bb350e6d561b0a92d121d80fc4a17f0d1c2f 100644
|
index 660e19896dd24f4b8c065b5fc6edece4cd5ff801..347cb76b0a51c4090179bae96eff266f4fb8d5aa 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -381,6 +381,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -381,6 +381,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren