mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
01a13871de
Patch documentation to come Issues with the old system that are fixed now: - World generation does not scale with cpu cores effectively. - Relies on the main thread for scheduling and maintaining chunk state, dropping chunk load/generate rates at lower tps. - Unreliable prioritisation of chunk gen/load calls that block the main thread. - Shutdown logic is utterly unreliable, as it has to wait for all chunks to unload - is it guaranteed that the chunk system is in a state on shutdown that it can reliably do this? Watchdog shutdown also typically failed due to thread checks, which is now resolved. - Saving of data is not unified (i.e can save chunk data without saving entity data, poses problems for desync if shutdown is really abnormal. - Entities are not loaded with chunks. This caused quite a bit of headache for Chunk#getEntities API, but now the new chunk system loads entities with chunks so that they are ready whenever the chunk loads in. Effectively brings the behavior back to 1.16 era, but still storing entities in their own separate regionfiles. The above list is not complete. The patch documentation will complete it. New chunk system hard relies on starlight and dataconverter, and most importantly the new concurrent utilities in ConcurrentUtil. Some of the old async chunk i/o interface (i.e the old file io thread reroutes _some_ calls to the new file io thread) is kept for plugin compat reasons. It will be removed in the next major version of minecraft. The old legacy chunk system patches have been moved to the removed folder in case we need them again.
39 lines
1.7 KiB
Diff
39 lines
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
|
Date: Sun, 23 Sep 2018 20:59:53 -0500
|
|
Subject: [PATCH] Honor EntityAgeable.ageLock
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/AgeableMob.java b/src/main/java/net/minecraft/world/entity/AgeableMob.java
|
|
index 6113e05a0636cc4895bccfbf87eef306138bcd33..22ba53d9f8866327752b0c33b517adb02c50b684 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/AgeableMob.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/AgeableMob.java
|
|
@@ -84,6 +84,7 @@ public abstract class AgeableMob extends PathfinderMob {
|
|
}
|
|
|
|
public void ageUp(int age, boolean overGrow) {
|
|
+ if (this.ageLocked) return; // Paper - GH-1459
|
|
int j = this.getAge();
|
|
int k = j;
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
|
|
index bd70aa9448a429f813f494c02d09432532985152..ea63802f2644bc2b5b3b0c72d7d09813cb68139d 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
|
|
@@ -299,6 +299,7 @@ public class BeehiveBlockEntity extends BlockEntity {
|
|
}
|
|
|
|
private static void setBeeReleaseData(int ticks, Bee bee) {
|
|
+ if (!bee.ageLocked) { // Paper - respect age lock
|
|
int j = bee.getAge();
|
|
|
|
if (j < 0) {
|
|
@@ -306,6 +307,7 @@ public class BeehiveBlockEntity extends BlockEntity {
|
|
} else if (j > 0) {
|
|
bee.setAge(Math.max(0, j - ticks));
|
|
}
|
|
+ } // Paper - respect age lock
|
|
|
|
bee.setInLoveTime(Math.max(0, bee.getInLoveTime() - ticks));
|
|
}
|