mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-19 15:09:25 +00:00
Update changes from ver/1.21.4 branch
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
# Leaf license
|
# Leaf license
|
||||||
|
|
||||||
|
Leaf inherits licenses from upstream projects.
|
||||||
|
|
||||||
Paperweight files are licensed under [MIT](https://opensource.org/licenses/MIT) (included in `license/MIT.txt`).
|
Paperweight files are licensed under [MIT](https://opensource.org/licenses/MIT) (included in `license/MIT.txt`).
|
||||||
Patches are licensed under MIT, unless indicated differently in their header (some patches are licensed under [GPL-3.0](https://www.gnu.org/licenses/gpl-3.0.html) (included in `license/GPL-3.0.txt`) or [LGPL-3.0](https://www.gnu.org/licenses/lgpl-3.0.html) (included in `license/LGPL-3.0.txt`)).
|
Patches are licensed under MIT, unless indicated differently in their header (some patches are licensed under [GPL-3.0](https://www.gnu.org/licenses/gpl-3.0.html) (included in `license/GPL-3.0.txt`), [LGPL-3.0](https://www.gnu.org/licenses/lgpl-3.0.html) (included in `license/LGPL-3.0.txt`), or [Apache-2.0](https://www.apache.org/licenses/) (included in `license/Apache-2.0.txt`)).
|
||||||
|
Certain patches are derived from other projects and retain the original licenses, as noted in the patch header.
|
||||||
Binaries are licensed under GPL-3.0.
|
Binaries are licensed under GPL-3.0.
|
||||||
|
|
||||||
|
Also see [PaperMC/Paper](https://github.com/PaperMC/Paper), [PaperMC/paperweight](https://github.com/PaperMC/paperweight), and the repositories of other dependencies used by this project for their respective licenses.
|
||||||
|
|||||||
@@ -87,11 +87,9 @@ java {
|
|||||||
```
|
```
|
||||||
|
|
||||||
## ⚖️ License
|
## ⚖️ License
|
||||||
Paperweight files are licensed under [MIT](licenses/MIT.txt).
|
Leaf is licensed under multiple open source licenses depending on upstream projects and other materials,
|
||||||
Patches are licensed under [MIT](licenses/MIT.txt), unless indicated differently in their header.
|
|
||||||
Binaries are licensed under [GPL-3.0](licenses/GPL-3.0.txt).
|
|
||||||
|
|
||||||
Also see [PaperMC/Paper](https://github.com/PaperMC/Paper) and [PaperMC/paperweight](https://github.com/PaperMC/paperweight) for the licenses of some materials used by this project.
|
see [LICENSE.md](LICENSE.md) for full license information.
|
||||||
|
|
||||||
## 📜 Credits
|
## 📜 Credits
|
||||||
Thanks to these projects below. Leaf includes some patches taken from them.<br>
|
Thanks to these projects below. Leaf includes some patches taken from them.<br>
|
||||||
|
|||||||
@@ -3,23 +3,20 @@ From: hayanesuru <hayanesuru@outlook.jp>
|
|||||||
Date: Wed, 4 Jun 2025 20:54:32 +0900
|
Date: Wed, 4 Jun 2025 20:54:32 +0900
|
||||||
Subject: [PATCH] preload mob spawning position
|
Subject: [PATCH] preload mob spawning position
|
||||||
|
|
||||||
|
Removed since Leaf 1.21.4, No need
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/level/NaturalSpawner.java b/net/minecraft/world/level/NaturalSpawner.java
|
diff --git a/net/minecraft/world/level/NaturalSpawner.java b/net/minecraft/world/level/NaturalSpawner.java
|
||||||
index a55abb08093847a8bfec446659f9af5fb1df2824..555983c7fa7b1f2d72ebbc148ca3dcb7cd217c56 100644
|
index 458b17dca84c87591b030679c5aac6259c0f8308..c69922ac2b831d8af35c9e98a34825e6b8a268da 100644
|
||||||
--- a/net/minecraft/world/level/NaturalSpawner.java
|
--- a/net/minecraft/world/level/NaturalSpawner.java
|
||||||
+++ b/net/minecraft/world/level/NaturalSpawner.java
|
+++ b/net/minecraft/world/level/NaturalSpawner.java
|
||||||
@@ -243,12 +243,61 @@ public final class NaturalSpawner {
|
@@ -257,9 +257,57 @@ public final class NaturalSpawner {
|
||||||
// Paper end - throttle failed spawn attempts
|
|
||||||
) {
|
|
||||||
// Paper end - Optional per player mob spawns
|
// Paper end - Optional per player mob spawns
|
||||||
- BlockPos randomPosWithin = getRandomPosWithin(level, chunk);
|
// Leaf start - optimize mob spawning
|
||||||
- if (randomPosWithin.getY() >= level.getMinY() + 1) {
|
BlockPos.MutableBlockPos pos = new BlockPos.MutableBlockPos();
|
||||||
- return spawnCategoryForPosition(category, level, chunk, randomPosWithin, filter, callback, maxSpawns, trackEntity, false); // Paper - Optional per player mob spawns // Paper - throttle failed spawn attempts
|
- mutableRandomPosWithin(pos, level, chunk);
|
||||||
- }
|
- if (pos.getY() < level.getMinY() + 1) {
|
||||||
|
- return 0;
|
||||||
+ // Leaf start - preload mob spawning position
|
+ // Leaf start - preload mob spawning position
|
||||||
+ BlockPos.MutableBlockPos pos = new BlockPos.MutableBlockPos();
|
|
||||||
|
|
||||||
- return 0; // Paper - throttle failed spawn attempts
|
|
||||||
+ if (org.dreeam.leaf.config.modules.opt.PreloadNaturalMobSpawning.enabled) {
|
+ if (org.dreeam.leaf.config.modules.opt.PreloadNaturalMobSpawning.enabled) {
|
||||||
+ if (chunk.cacheSpawnPosIndex == 16 || chunk.cacheSpawnPosIndex == -1) {
|
+ if (chunk.cacheSpawnPosIndex == 16 || chunk.cacheSpawnPosIndex == -1) {
|
||||||
+ if (chunk.cacheSpawnPos == null) {
|
+ if (chunk.cacheSpawnPos == null) {
|
||||||
@@ -69,13 +66,11 @@ index a55abb08093847a8bfec446659f9af5fb1df2824..555983c7fa7b1f2d72ebbc148ca3dcb7
|
|||||||
+ if (bs == null || bs.isRedstoneConductor(level, pos)) {
|
+ if (bs == null || bs.isRedstoneConductor(level, pos)) {
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
|
||||||
+ return spawnCategoryForPosition(category, level, chunk, pos, filter, callback, maxSpawns, trackEntity, false); // Paper - Optional per player mob spawns // Paper - throttle failed spawn attempts
|
|
||||||
+ // Leaf end - preload mob spawning position
|
+ // Leaf end - preload mob spawning position
|
||||||
}
|
}
|
||||||
|
return spawnCategoryForPosition(category, level, chunk, pos, filter, callback, maxSpawns, trackEntity, false); // Paper - Optional per player mob spawns // Paper - throttle failed spawn attempts
|
||||||
@VisibleForDebug
|
// Leaf end - optimize mob spawning
|
||||||
@@ -270,7 +319,12 @@ public final class NaturalSpawner {
|
@@ -284,7 +332,12 @@ public final class NaturalSpawner {
|
||||||
MobCategory category, ServerLevel level, ChunkAccess chunk, BlockPos pos, NaturalSpawner.SpawnPredicate filter, NaturalSpawner.AfterSpawnCallback callback, final int maxSpawns, final @Nullable Consumer<Entity> trackEntity
|
MobCategory category, ServerLevel level, ChunkAccess chunk, BlockPos pos, NaturalSpawner.SpawnPredicate filter, NaturalSpawner.AfterSpawnCallback callback, final int maxSpawns, final @Nullable Consumer<Entity> trackEntity
|
||||||
// Paper start - throttle failed spawn attempts
|
// Paper start - throttle failed spawn attempts
|
||||||
) {
|
) {
|
||||||
@@ -89,25 +84,25 @@ index a55abb08093847a8bfec446659f9af5fb1df2824..555983c7fa7b1f2d72ebbc148ca3dcb7
|
|||||||
}
|
}
|
||||||
public static int spawnCategoryForPosition(
|
public static int spawnCategoryForPosition(
|
||||||
MobCategory category, ServerLevel level, ChunkAccess chunk, BlockPos pos, NaturalSpawner.SpawnPredicate filter, NaturalSpawner.AfterSpawnCallback callback, final int maxSpawns, final @Nullable Consumer<Entity> trackEntity, final boolean nothing
|
MobCategory category, ServerLevel level, ChunkAccess chunk, BlockPos pos, NaturalSpawner.SpawnPredicate filter, NaturalSpawner.AfterSpawnCallback callback, final int maxSpawns, final @Nullable Consumer<Entity> trackEntity, final boolean nothing
|
||||||
@@ -281,8 +335,8 @@ public final class NaturalSpawner {
|
@@ -297,8 +350,8 @@ public final class NaturalSpawner {
|
||||||
ChunkGenerator generator = level.getChunkSource().getGenerator();
|
int posX = pos.getX(); // Leaf - optimize mob spawning
|
||||||
int y = pos.getY();
|
int posZ = pos.getZ(); // Leaf - optimize mob spawning
|
||||||
int i = 0; // Paper - throttle failed spawn attempts
|
int i = 0; // Paper - throttle failed spawn attempts
|
||||||
- BlockState blockState = level.getBlockStateIfLoadedAndInBounds(pos); // Paper - don't load chunks for mob spawn
|
- BlockState blockState = level.getBlockStateIfLoadedAndInBounds(pos); // Paper - don't load chunks for mob spawn
|
||||||
- if (blockState != null && !blockState.isRedstoneConductor(chunk, pos)) { // Paper - don't load chunks for mob spawn
|
- if (blockState != null && !blockState.isRedstoneConductor(chunk, pos)) { // Paper - don't load chunks for mob spawn
|
||||||
+ //BlockState blockState = level.getBlockStateIfLoadedAndInBounds(pos); // Paper - don't load chunks for mob spawn // Leaf - preload mob spawning position
|
+ //BlockState blockState = level.getBlockStateIfLoadedAndInBounds(pos); // Paper - don't load chunks for mob spawn // Leaf - preload mob spawning position
|
||||||
+ if (true /*blockState != null && !blockState.isRedstoneConductor(chunk, pos)*/) { // Paper - don't load chunks for mob spawn // Leaf - preload mob spawning position
|
+ if (true /*blockState != null && !blockState.isRedstoneConductor(chunk, pos)*/) { // Paper - don't load chunks for mob spawn // Leaf - preload mob spawning position
|
||||||
BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos();
|
BlockPos.MutableBlockPos mutableBlockPos = pos instanceof BlockPos.MutableBlockPos pos2 ? pos2 : new BlockPos.MutableBlockPos(); // Leaf - optimize mob spawning
|
||||||
//int i = 0; // Paper - throttle failed spawn attempts - move up
|
//int i = 0; // Paper - throttle failed spawn attempts - move up
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
|
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
index 31f19dfe16e270b55f3b44754c97ed8d9fa422cf..b79eefb182b0a9e9f22ccb649c4659483228082c 100644
|
index a90bf0d80ae4dac9b19b8e467b402917cc19a271..804f2118167b1607c50ca8378119254e8760427a 100644
|
||||||
--- a/net/minecraft/world/level/chunk/LevelChunk.java
|
--- a/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
|
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
@@ -107,6 +107,8 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
@@ -106,6 +106,8 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||||
// Paper start - rewrite chunk system
|
// Paper start - rewrite chunk system
|
||||||
private boolean postProcessingDone;
|
private boolean postProcessingDone;
|
||||||
private ca.spottedleaf.moonrise.patches.chunk_system.scheduling.NewChunkHolder chunkAndHolder;
|
private net.minecraft.server.level.ServerChunkCache.ChunkAndHolder chunkAndHolder;
|
||||||
+ public long[] cacheSpawnPos = null; // Leaf - preload mob spawning position
|
+ public long[] cacheSpawnPos = null; // Leaf - preload mob spawning position
|
||||||
+ public int cacheSpawnPosIndex = -1; // Leaf - preload mob spawning position
|
+ public int cacheSpawnPosIndex = -1; // Leaf - preload mob spawning position
|
||||||
|
|
||||||
@@ -3,6 +3,9 @@ From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com>
|
|||||||
Date: Tue, 9 Nov 2077 00:00:00 +0800
|
Date: Tue, 9 Nov 2077 00:00:00 +0800
|
||||||
Subject: [PATCH] Lithium: equipment tracking
|
Subject: [PATCH] Lithium: equipment tracking
|
||||||
|
|
||||||
|
TODO: needs to fix issues related to Piglins lose the crossbow animation
|
||||||
|
original report is in discord.
|
||||||
|
|
||||||
Should have special treatment to ArmorStand, since Paper introduced the configurable
|
Should have special treatment to ArmorStand, since Paper introduced the configurable
|
||||||
ArmorStand no-tick, and still gives it ability to update equipment changes.
|
ArmorStand no-tick, and still gives it ability to update equipment changes.
|
||||||
Thus added a bypass condition in LivingEntity#collectEquipmentChanges, always send
|
Thus added a bypass condition in LivingEntity#collectEquipmentChanges, always send
|
||||||
@@ -34,7 +34,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/item/crafting/ShapelessRecipe.java b/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
diff --git a/net/minecraft/world/item/crafting/ShapelessRecipe.java b/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
||||||
index d601b54b1de2f2ae44fe2b20c8116c71a6340e45..6a53e97d27d746621892ced4ca5b4a56b6bc4c23 100644
|
index d601b54b1de2f2ae44fe2b20c8116c71a6340e45..6a53e97d27d746621892ced4ca5b4a56b6bc4c23 100644
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/entity/projectile/Projectile.java b/net/minecraft/world/entity/projectile/Projectile.java
|
diff --git a/net/minecraft/world/entity/projectile/Projectile.java b/net/minecraft/world/entity/projectile/Projectile.java
|
||||||
index 4487c03183d20a187d391dd124abb7b926508b5b..84c846d2ef4990befb2891631ac5ae16d881401b 100644
|
index 4487c03183d20a187d391dd124abb7b926508b5b..84c846d2ef4990befb2891631ac5ae16d881401b 100644
|
||||||
|
|||||||
@@ -49,10 +49,10 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java
|
diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java
|
||||||
index 4167b46148fc370f20b35c2a261e38c0698855d4..52cef9fed4a68d16d89eabacbad073ead0685972 100644
|
index 5005ad97fe4830c6563bca50a77a6abd36c984df..3d7d336c2043b533012ee390e6da02ac4f64e1f2 100644
|
||||||
--- a/net/minecraft/server/level/ServerChunkCache.java
|
--- a/net/minecraft/server/level/ServerChunkCache.java
|
||||||
+++ b/net/minecraft/server/level/ServerChunkCache.java
|
+++ b/net/minecraft/server/level/ServerChunkCache.java
|
||||||
@@ -499,6 +499,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
@@ -499,6 +499,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||||
@@ -64,7 +64,7 @@ index 4167b46148fc370f20b35c2a261e38c0698855d4..52cef9fed4a68d16d89eabacbad073ea
|
|||||||
this.tickChunks(l); // Gale - Purpur - remove vanilla profiler
|
this.tickChunks(l); // Gale - Purpur - remove vanilla profiler
|
||||||
}
|
}
|
||||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||||
index 3941d15753aef952ad1fd5b5f96cb810f4f251e3..06439db58ecec0ead6c0a4e30357a9a3b3ebd120 100644
|
index 28377b1d568e70f4ff1e5a6eea39e7fb9e1233e7..606dee544c669dcaa0eb02808c5786545b5519eb 100644
|
||||||
--- a/net/minecraft/server/level/ServerLevel.java
|
--- a/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -879,13 +879,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
@@ -879,13 +879,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||||
|
|||||||
@@ -28,10 +28,10 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/entity/monster/EnderMan.java b/net/minecraft/world/entity/monster/EnderMan.java
|
diff --git a/net/minecraft/world/entity/monster/EnderMan.java b/net/minecraft/world/entity/monster/EnderMan.java
|
||||||
index ab7f7846d3fc0252c6f71277b3e67d7a785a96b5..6c2bfad0ad7a5c20cd6eeba9fdc713c85c357ef4 100644
|
index 5ae08be75ca01924fc78bdd8d6bb6747ddc21aea..84a9dbf5898fb519fad5fdc3ea1d9a2054d1e0eb 100644
|
||||||
--- a/net/minecraft/world/entity/monster/EnderMan.java
|
--- a/net/minecraft/world/entity/monster/EnderMan.java
|
||||||
+++ b/net/minecraft/world/entity/monster/EnderMan.java
|
+++ b/net/minecraft/world/entity/monster/EnderMan.java
|
||||||
@@ -300,11 +300,19 @@ public class EnderMan extends Monster implements NeutralMob {
|
@@ -300,11 +300,19 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/entity/ai/behavior/AcquirePoi.java b/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
|
diff --git a/net/minecraft/world/entity/ai/behavior/AcquirePoi.java b/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
|
||||||
index b9174ae7e3a3e2de2d570b95ab5012ac3c3a2eda..751e91a922b20c96f27885c3eb085ec4ae39091b 100644
|
index b9174ae7e3a3e2de2d570b95ab5012ac3c3a2eda..751e91a922b20c96f27885c3eb085ec4ae39091b 100644
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/entity/ai/targeting/TargetingConditions.java b/net/minecraft/world/entity/ai/targeting/TargetingConditions.java
|
diff --git a/net/minecraft/world/entity/ai/targeting/TargetingConditions.java b/net/minecraft/world/entity/ai/targeting/TargetingConditions.java
|
||||||
index 2f8920d8ee765d057a22d76f24f7d7dc1b0b17ca..17a08a3af468093668a41f154c2beb69c6617efa 100644
|
index 2f8920d8ee765d057a22d76f24f7d7dc1b0b17ca..17a08a3af468093668a41f154c2beb69c6617efa 100644
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/io/papermc/paper/entity/activation/ActivationRange.java b/io/papermc/paper/entity/activation/ActivationRange.java
|
diff --git a/io/papermc/paper/entity/activation/ActivationRange.java b/io/papermc/paper/entity/activation/ActivationRange.java
|
||||||
index 2ebee223085fe7926c7f3e555df19ae69f36157e..602ed4c5556723e54a80ccc3481af31109d5a0a6 100644
|
index 2ebee223085fe7926c7f3e555df19ae69f36157e..602ed4c5556723e54a80ccc3481af31109d5a0a6 100644
|
||||||
@@ -44,7 +44,7 @@ index 2ebee223085fe7926c7f3e555df19ae69f36157e..602ed4c5556723e54a80ccc3481af311
|
|||||||
}
|
}
|
||||||
if (entity instanceof final Mob mob && mob.getTarget() != null) {
|
if (entity instanceof final Mob mob && mob.getTarget() != null) {
|
||||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 07df62b79a4ee9c9da77cac8615fad5463628204..bb687f048be9edfde75d13354dd3265593e83e9f 100644
|
index 79f499fea47a9c675da1aed718c713290bc008d0..f019571b4b6b5e2d1953030911449a02e459591c 100644
|
||||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -2083,6 +2083,21 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -2083,6 +2083,21 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/phys/shapes/EntityCollisionContext.java b/net/minecraft/world/phys/shapes/EntityCollisionContext.java
|
diff --git a/net/minecraft/world/phys/shapes/EntityCollisionContext.java b/net/minecraft/world/phys/shapes/EntityCollisionContext.java
|
||||||
index ebc9360ea64a248418fcac8b446664b0dd019335..b09d1b7c76410580663f2419e3b5e917fedabd54 100644
|
index ebc9360ea64a248418fcac8b446664b0dd019335..b09d1b7c76410580663f2419e3b5e917fedabd54 100644
|
||||||
|
|||||||
@@ -28,10 +28,10 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/net/minecraft/server/level/ServerEntity.java b/net/minecraft/server/level/ServerEntity.java
|
diff --git a/net/minecraft/server/level/ServerEntity.java b/net/minecraft/server/level/ServerEntity.java
|
||||||
index b118e91f1e0b5a8b8c0b2a4a32faabc5a34a5954..0db57c334bef3b6473ae1b734f953e150862eab5 100644
|
index 7360914a6f4dc43758c38f2c6c7f8d458cc14c4d..7fe21b10eefce56dde19baebf9cb6d2d0a8d73ec 100644
|
||||||
--- a/net/minecraft/server/level/ServerEntity.java
|
--- a/net/minecraft/server/level/ServerEntity.java
|
||||||
+++ b/net/minecraft/server/level/ServerEntity.java
|
+++ b/net/minecraft/server/level/ServerEntity.java
|
||||||
@@ -189,19 +189,25 @@ public class ServerEntity {
|
@@ -189,19 +189,25 @@ public class ServerEntity {
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java b/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java
|
diff --git a/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java b/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java
|
||||||
index d0ab3db7bbd2942db19f473474371b20ce822608..3f080b15543bf8c5fa0774b62d7f12e13b82511a 100644
|
index d0ab3db7bbd2942db19f473474371b20ce822608..3f080b15543bf8c5fa0774b62d7f12e13b82511a 100644
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||||
index 606dee544c669dcaa0eb02808c5786545b5519eb..f14aab66d200828952b647fa8424caec757a9e9c 100644
|
index 606dee544c669dcaa0eb02808c5786545b5519eb..f14aab66d200828952b647fa8424caec757a9e9c 100644
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/io/papermc/paper/entity/activation/ActivationRange.java b/io/papermc/paper/entity/activation/ActivationRange.java
|
diff --git a/io/papermc/paper/entity/activation/ActivationRange.java b/io/papermc/paper/entity/activation/ActivationRange.java
|
||||||
index bdbbbc5e0c06c71584e7514623d0c8be168befd7..f3ca86e09a4a076d143fb21eac529967ff004df4 100644
|
index bdbbbc5e0c06c71584e7514623d0c8be168befd7..f3ca86e09a4a076d143fb21eac529967ff004df4 100644
|
||||||
|
|||||||
@@ -3,6 +3,23 @@ From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
|
|||||||
Date: Thu, 28 Mar 2024 13:36:09 -0400
|
Date: Thu, 28 Mar 2024 13:36:09 -0400
|
||||||
Subject: [PATCH] Cache player profileResult
|
Subject: [PATCH] Cache player profileResult
|
||||||
|
|
||||||
|
This patch includes code that references the Caffeine caching library,
|
||||||
|
which is licensed under the Apache License, Version 2.0.
|
||||||
|
|
||||||
|
Caffeine (https://github.com/ben-manes/caffeine)
|
||||||
|
Copyright (c) Ben Manes
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
diff --git a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
diff --git a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
index 9dce1d22c7de3a3dd0e0e8f117cfbb54d1b15042..6b0b0ccc18a5da05685867656705e1fcf94b5891 100644
|
index 9dce1d22c7de3a3dd0e0e8f117cfbb54d1b15042..6b0b0ccc18a5da05685867656705e1fcf94b5891 100644
|
||||||
|
|||||||
@@ -4,6 +4,23 @@ Date: Sun, 23 Jun 2024 11:26:20 +0800
|
|||||||
Subject: [PATCH] Use caffeine cache for kickPermission instead of using
|
Subject: [PATCH] Use caffeine cache for kickPermission instead of using
|
||||||
google.common.cache
|
google.common.cache
|
||||||
|
|
||||||
|
This patch includes code that references the Caffeine caching library,
|
||||||
|
which is licensed under the Apache License, Version 2.0.
|
||||||
|
|
||||||
|
Caffeine (https://github.com/ben-manes/caffeine)
|
||||||
|
Copyright (c) Ben Manes
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 3c14d32ec9caf3dba9d99afe86a3ca053de70958..155e2047659111f68e27d3517e5178afa233dfe4 100644
|
index 3c14d32ec9caf3dba9d99afe86a3ca053de70958..155e2047659111f68e27d3517e5178afa233dfe4 100644
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Only player pushable
|
|||||||
Useful for extreme cases like massive entities collide together in a small area
|
Useful for extreme cases like massive entities collide together in a small area
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||||
index a927e8a7d9149f5b7abaae50ba8d4fdc6ec87b55..0f717ee9e977ece4f30e66d9d1caf6bb7beecda7 100644
|
index b3e9ad0669bb4b91d5d991f106b225e914a4e68f..d19d253ce100aee5e2a12eeb4ea50065760ed702 100644
|
||||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -3635,7 +3635,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3630,7 +3630,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
this.checkAutoSpinAttack(boundingBox, this.getBoundingBox());
|
this.checkAutoSpinAttack(boundingBox, this.getBoundingBox());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ index a927e8a7d9149f5b7abaae50ba8d4fdc6ec87b55..0f717ee9e977ece4f30e66d9d1caf6bb
|
|||||||
// Paper start - Add EntityMoveEvent
|
// Paper start - Add EntityMoveEvent
|
||||||
// Purpur start - Ridables
|
// Purpur start - Ridables
|
||||||
if (this.xo != this.getX() || this.yo != this.getY() || this.zo != this.getZ() || this.yRotO != this.getYRot() || this.xRotO != this.getXRot()) {
|
if (this.xo != this.getX() || this.yo != this.getY() || this.zo != this.getZ() || this.yRotO != this.getYRot() || this.xRotO != this.getXRot()) {
|
||||||
@@ -3778,7 +3778,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3773,7 +3773,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Paper end - don't run getEntities if we're not going to use its result
|
// Paper end - don't run getEntities if we're not going to use its result
|
||||||
@@ -32,7 +32,7 @@ index a927e8a7d9149f5b7abaae50ba8d4fdc6ec87b55..0f717ee9e977ece4f30e66d9d1caf6bb
|
|||||||
if (!pushableEntities.isEmpty()) {
|
if (!pushableEntities.isEmpty()) {
|
||||||
if (this.level() instanceof ServerLevel serverLevel) {
|
if (this.level() instanceof ServerLevel serverLevel) {
|
||||||
// Paper - don't run getEntities if we're not going to use its result; moved up
|
// Paper - don't run getEntities if we're not going to use its result; moved up
|
||||||
@@ -3812,6 +3817,44 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3807,6 +3812,44 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ index a927e8a7d9149f5b7abaae50ba8d4fdc6ec87b55..0f717ee9e977ece4f30e66d9d1caf6bb
|
|||||||
AABB aabb = boundingBoxBeforeSpin.minmax(boundingBoxAfterSpin);
|
AABB aabb = boundingBoxBeforeSpin.minmax(boundingBoxAfterSpin);
|
||||||
List<Entity> entities = this.level().getEntities(this, aabb);
|
List<Entity> entities = this.level().getEntities(this, aabb);
|
||||||
diff --git a/net/minecraft/world/entity/decoration/ArmorStand.java b/net/minecraft/world/entity/decoration/ArmorStand.java
|
diff --git a/net/minecraft/world/entity/decoration/ArmorStand.java b/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||||
index cb2a8f9cff99a7a906bc7be09d301728742bc11e..f3ef1c11f1f5fe02c0b38f327b527221a5a45b0f 100644
|
index 0417175c7beabbca53cd080d158001eabe3941f0..2bfc578b7080b93e99daa45905e1890d3f7c5cbc 100644
|
||||||
--- a/net/minecraft/world/entity/decoration/ArmorStand.java
|
--- a/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||||
+++ b/net/minecraft/world/entity/decoration/ArmorStand.java
|
+++ b/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||||
@@ -247,7 +247,7 @@ public class ArmorStand extends LivingEntity {
|
@@ -247,7 +247,7 @@ public class ArmorStand extends LivingEntity {
|
||||||
@@ -992,10 +992,10 @@ index c4721eb0efe34f5e313bc890b4e960144eca4fe1..9dd3187fd968ab95e9d55b4c8cc74e78
|
|||||||
this.containerId = containerId;
|
this.containerId = containerId;
|
||||||
}
|
}
|
||||||
diff --git a/net/minecraft/world/item/ItemStack.java b/net/minecraft/world/item/ItemStack.java
|
diff --git a/net/minecraft/world/item/ItemStack.java b/net/minecraft/world/item/ItemStack.java
|
||||||
index d1c8b4a2a32d49d90f2f2aa460915d319a781535..aed9baa4e0f01e8844a774ab8d0bc08acd3c5271 100644
|
index 07f1b27116baf2a06e6cd4eeaa8639e166fb362d..1a5f65a32882aa43828305113f35a9cdb0bdb870 100644
|
||||||
--- a/net/minecraft/world/item/ItemStack.java
|
--- a/net/minecraft/world/item/ItemStack.java
|
||||||
+++ b/net/minecraft/world/item/ItemStack.java
|
+++ b/net/minecraft/world/item/ItemStack.java
|
||||||
@@ -411,8 +411,8 @@ public final class ItemStack implements DataComponentHolder, net.caffeinemc.mods
|
@@ -406,8 +406,8 @@ public final class ItemStack implements DataComponentHolder {
|
||||||
if (interactionResult.consumesAction() && serverLevel.captureTreeGeneration && !serverLevel.capturedBlockStates.isEmpty()) {
|
if (interactionResult.consumesAction() && serverLevel.captureTreeGeneration && !serverLevel.capturedBlockStates.isEmpty()) {
|
||||||
serverLevel.captureTreeGeneration = false;
|
serverLevel.captureTreeGeneration = false;
|
||||||
org.bukkit.Location location = org.bukkit.craftbukkit.util.CraftLocation.toBukkit(clickedPos, serverLevel.getWorld());
|
org.bukkit.Location location = org.bukkit.craftbukkit.util.CraftLocation.toBukkit(clickedPos, serverLevel.getWorld());
|
||||||
@@ -18,10 +18,10 @@ index 0c81dca5905c2d4c166661dc3473b0c1e9aa5265..373059fcccdab0a918aa1d1a4a613fb6
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 0f717ee9e977ece4f30e66d9d1caf6bb7beecda7..620ddc31b4ff91713aaa6f4c54998ea66670951d 100644
|
index d19d253ce100aee5e2a12eeb4ea50065760ed702..ae4d93515a28fb97e7abdfc06ce9ae31ec986fa8 100644
|
||||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -4088,9 +4088,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -4083,9 +4083,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (randomizeMotion) {
|
if (randomizeMotion) {
|
||||||
@@ -41,23 +41,3 @@ index 2d24d03bbdb5ee0d862cbfff2219f58afffafe12..703bf9c2a56b262e2719a1787584de53
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected boolean addEntity(final Entity entity, final boolean fromDisk, final boolean event) {
|
protected boolean addEntity(final Entity entity, final boolean fromDisk, final boolean event) {
|
||||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
|
||||||
index e1a722c3ec74c0967d089ad469d7b3305bf66195..74794efea55ce1874730c8a2de5fdd9277065d10 100644
|
|
||||||
--- a/net/minecraft/world/entity/Entity.java
|
|
||||||
+++ b/net/minecraft/world/entity/Entity.java
|
|
||||||
@@ -374,6 +374,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
||||||
// Paper end
|
|
||||||
// Paper start - rewrite chunk system
|
|
||||||
private final boolean isHardColliding = this.moonrise$isHardCollidingUncached();
|
|
||||||
+ @org.jetbrains.annotations.Nullable // Leaf - optimize getEntityStatus
|
|
||||||
private net.minecraft.server.level.FullChunkStatus chunkStatus;
|
|
||||||
private ca.spottedleaf.moonrise.patches.chunk_system.level.chunk.ChunkData chunkData;
|
|
||||||
private int sectionX = Integer.MIN_VALUE;
|
|
||||||
@@ -387,6 +388,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
+ @org.jetbrains.annotations.Nullable // Leaf - optimize getEntityStatus
|
|
||||||
public final net.minecraft.server.level.FullChunkStatus moonrise$getChunkStatus() {
|
|
||||||
return this.chunkStatus;
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user