mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-20 22:18:58 +01:00
Fix zombie villager infection chance hunk (#11974)
Dropped during hardfork, now moved to a false-ed out if statement to prevent dropping in future updates.
This commit is contained in:
parent
9f74858760
commit
eeec611b9d
1 changed files with 5 additions and 3 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue