[ci skip] add a good chunk of patch identifying comments

This commit is contained in:
granny
2024-12-16 04:03:27 -08:00
parent 73dae7f683
commit 998a4e6973
120 changed files with 3038 additions and 2824 deletions

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Cat spawning options
diff --git a/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java b/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java
index b0236c7bf9441aa84d3795ffed05dd6099f29636..796dcc0dcf9022b455b8847e045266b8802da0cf 100644
index b0236c7bf9441aa84d3795ffed05dd6099f29636..e9cbbcdcefe9acc24cf7972ae356fd590e128f56 100644
--- a/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java
+++ b/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java
@@ -27,7 +27,7 @@ public class CatSpawner implements CustomSpawner {
@@ -13,7 +13,7 @@ index b0236c7bf9441aa84d3795ffed05dd6099f29636..796dcc0dcf9022b455b8847e045266b8
return 0;
} else {
- this.nextTick = 1200;
+ this.nextTick = world.purpurConfig.catSpawnDelay; // Purpur
+ this.nextTick = world.purpurConfig.catSpawnDelay; // Purpur - Cat spawning options
Player player = world.getRandomPlayer();
if (player == null) {
return 0;
@@ -23,12 +23,12 @@ index b0236c7bf9441aa84d3795ffed05dd6099f29636..796dcc0dcf9022b455b8847e045266b8
int i = 48;
- if (world.getPoiManager().getCountInRange(entry -> entry.is(PoiTypes.HOME), pos, 48, PoiManager.Occupancy.IS_OCCUPIED) > 4L) {
- List<Cat> list = world.getEntitiesOfClass(Cat.class, new AABB(pos).inflate(48.0, 8.0, 48.0));
+ // Purpur start
+ // Purpur start - Cat spawning options
+ int range = world.purpurConfig.catSpawnVillageScanRange;
+ if (range <= 0) return 0;
+ if (world.getPoiManager().getCountInRange(entry -> entry.is(PoiTypes.HOME), pos, range, PoiManager.Occupancy.IS_OCCUPIED) > 4L) {
+ List<Cat> list = world.getEntitiesOfClass(Cat.class, new AABB(pos).inflate(range, 8.0, range));
+ // Purpur end
+ // Purpur end - Cat spawning options
if (list.size() < 5) {
return this.spawnCat(pos, world);
}
@@ -37,11 +37,11 @@ index b0236c7bf9441aa84d3795ffed05dd6099f29636..796dcc0dcf9022b455b8847e045266b8
private int spawnInHut(ServerLevel world, BlockPos pos) {
int i = 16;
- List<Cat> list = world.getEntitiesOfClass(Cat.class, new AABB(pos).inflate(16.0, 8.0, 16.0));
+ // Purpur start
+ // Purpur start - Cat spawning options
+ int range = world.purpurConfig.catSpawnSwampHutScanRange;
+ if (range <= 0) return 0;
+ List<Cat> list = world.getEntitiesOfClass(Cat.class, new AABB(pos).inflate(range, 8.0, range));
+ // Purpur end
+ // Purpur end - Cat spawning options
return list.size() < 1 ? this.spawnCat(pos, world) : 0;
}