geforkt von Mirrors/Paper
Fix PaperTickList (#6191)
Dieser Commit ist enthalten in:
Ursprung
186cf8842e
Commit
b166af8801
@ -168,7 +168,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ private void queueEntryForTick(final TickNextTickData<T> entry, final ServerChunkCache chunkProvider) {
|
||||
+ if (entry.tickState == STATE_SCHEDULED) {
|
||||
+ if (chunkProvider.isTickingReadyMainThread(entry.pos)) {
|
||||
+ if (chunkProvider.isPositionTickingWithEntitiesLoaded(entry.pos)) {
|
||||
+ this.toTickThisTick.add(entry);
|
||||
+ entry.tickState = STATE_PENDING_TICK;
|
||||
+ } else {
|
||||
@ -368,7 +368,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ continue;
|
||||
+ }
|
||||
+ try {
|
||||
+ if (chunkProvider.isTickingReadyMainThread(toTick.pos)) {
|
||||
+ if (chunkProvider.isPositionTickingWithEntitiesLoaded(toTick.pos)) {
|
||||
+ toTick.tickState = STATE_TICKING;
|
||||
+ this.tickFunction.accept(toTick);
|
||||
+ if (toTick.tickState == STATE_TICKING) {
|
||||
@ -932,9 +932,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
// Paper end
|
||||
+ // Paper start - rewrite ticklistserver
|
||||
+ public final boolean isTickingReadyMainThread(BlockPos pos) {
|
||||
+ ChunkHolder chunk = this.chunkMap.getUpdatingChunkIfPresent(net.minecraft.server.MCUtil.getCoordinateKey(pos));
|
||||
+ return chunk != null && chunk.isTickingReady();
|
||||
+ public final boolean isPositionTickingWithEntitiesLoaded(BlockPos pos) {
|
||||
+ long position = net.minecraft.server.MCUtil.getCoordinateKey(pos);
|
||||
+ ChunkHolder chunkHolder = this.chunkMap.getUpdatingChunkIfPresent(position);
|
||||
+ return chunkHolder != null && chunkHolder.isTickingReady() && this.level.entityManager.areEntitiesLoaded(position);
|
||||
+ }
|
||||
+ // Paper end - rewrite ticklistserver
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren