Update patches to latest 1.21.4 #1

Merged
Chaoscaot merged 242 commits from update/1.21.4 into main 2025-04-23 22:27:11 +02:00
186 changed files with 2294 additions and 986 deletions
Showing only changes of commit eeec611b9d - Show all commits

View File

@ -191,7 +191,7 @@
}
@Override
@@ -423,12 +_,18 @@
@@ -423,13 +_,19 @@
if (compound.contains("DrownedConversionTime", 99) && compound.getInt("DrownedConversionTime") > -1) {
this.startUnderWaterConversion(compound.getInt("DrownedConversionTime"));
}
@ -206,11 +206,13 @@
public boolean killedEntity(ServerLevel level, LivingEntity entity) {
boolean flag = super.killedEntity(level, entity);
- if ((level.getDifficulty() == Difficulty.NORMAL || level.getDifficulty() == Difficulty.HARD) && entity instanceof Villager villager) {
+ final double fallbackChance = level.getDifficulty() == Difficulty.HARD ? 100 : level.getDifficulty() == Difficulty.NORMAL ? 50 : 0; // Paper - Configurable chance of villager zombie infection
- if (level.getDifficulty() != Difficulty.HARD && this.random.nextBoolean()) {
+ final double fallbackChance = level.getDifficulty() == Difficulty.HARD ? 100 : level.getDifficulty() == Difficulty.NORMAL ? 50 : 0; // Paper - Configurable chance of villager zombie infection - moved up from belows if
+ if (this.random.nextDouble() * 100 < level.paperConfig().entities.behavior.zombieVillagerInfectionChance.or(fallbackChance) && entity instanceof Villager villager) { // Paper - Configurable chance of villager zombie infection
if (level.getDifficulty() != Difficulty.HARD && this.random.nextBoolean()) {
+ if (false && level.getDifficulty() != Difficulty.HARD && this.random.nextBoolean()) { // Paper - Configurable chance of villager zombie infection - moved to "fallbackChance"
return flag;
}
@@ -465,7 +_,7 @@
spawnGroupData = super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData);
float specialMultiplier = difficulty.getSpecialMultiplier();