diff options
author | Spottedleaf <[email protected]> | 2020-06-26 21:57:36 -0700 |
---|---|---|
committer | Spottedleaf <[email protected]> | 2020-06-26 21:57:36 -0700 |
commit | 654f3e9d3efd6b2d0c9c1e2d0f4c336d3494a629 (patch) | |
tree | b0f392161bce8a529214becda81a4df329657b15 /Spigot-Server-Patches/0425-Configurable-chance-of-villager-zombie-infection.patch | |
parent | 8c0c587472e30488d6fae2e326f31e88f9688dc2 (diff) | |
download | Paper-654f3e9d3efd6b2d0c9c1e2d0f4c336d3494a629.tar.gz Paper-654f3e9d3efd6b2d0c9c1e2d0f4c336d3494a629.zip |
Re-Add per player mob spawning
Diffstat (limited to 'Spigot-Server-Patches/0425-Configurable-chance-of-villager-zombie-infection.patch')
-rw-r--r-- | Spigot-Server-Patches/0425-Configurable-chance-of-villager-zombie-infection.patch | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/Spigot-Server-Patches/0425-Configurable-chance-of-villager-zombie-infection.patch b/Spigot-Server-Patches/0425-Configurable-chance-of-villager-zombie-infection.patch deleted file mode 100644 index 9ad2865ae2..0000000000 --- a/Spigot-Server-Patches/0425-Configurable-chance-of-villager-zombie-infection.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zero <[email protected]> -Date: Sat, 22 Feb 2020 16:10:31 -0500 -Subject: [PATCH] Configurable chance of villager zombie infection - -This allows you to solve an issue in vanilla behavior where: -* On easy difficulty your villagers will NEVER get infected, meaning they will always die. -* On normal difficulty they will have a 50% of getting infected or dying. - -diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 143fe59272dda1ecaf9c3b4493e13e8ef0762ee1..01bb16e35a7b737c0a8be5e37c22aa756388b268 100644 ---- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -601,4 +601,9 @@ public class PaperWorldConfig { - private void nerfNetherPortalPigmen() { - nerfNetherPortalPigmen = getBoolean("game-mechanics.nerf-pigmen-from-nether-portals", nerfNetherPortalPigmen); - } -+ -+ public double zombieVillagerInfectionChance = -1.0; -+ private void zombieVillagerInfectionChance() { -+ zombieVillagerInfectionChance = getDouble("zombie-villager-infection-chance", zombieVillagerInfectionChance); -+ } - } -diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 9bb54d13a318199bbce3d5b32db3710f822daa40..ad8b1f0e419e6341eb46def2dc58423588a65882 100644 ---- a/src/main/java/net/minecraft/server/EntityZombie.java -+++ b/src/main/java/net/minecraft/server/EntityZombie.java -@@ -390,10 +390,14 @@ public class EntityZombie extends EntityMonster { - @Override - public void a_(EntityLiving entityliving) { - super.a_(entityliving); -- if ((this.world.getDifficulty() == EnumDifficulty.NORMAL || this.world.getDifficulty() == EnumDifficulty.HARD) && entityliving instanceof EntityVillager) { -- if (this.world.getDifficulty() != EnumDifficulty.HARD && this.random.nextBoolean()) { -+ // Paper start -+ if (world.paperConfig.zombieVillagerInfectionChance != 0.0 && (world.paperConfig.zombieVillagerInfectionChance != -1.0 || this.world.getDifficulty() == EnumDifficulty.NORMAL || this.world.getDifficulty() == EnumDifficulty.HARD) && entityliving instanceof EntityVillager) { -+ if (world.paperConfig.zombieVillagerInfectionChance == -1.0 && this.world.getDifficulty() != EnumDifficulty.HARD && this.random.nextBoolean()) { - return; - } -+ if (world.paperConfig.zombieVillagerInfectionChance != -1.0 && (this.random.nextDouble() * 100.0) > world.paperConfig.zombieVillagerInfectionChance) { -+ return; -+ } // Paper end - - EntityVillager entityvillager = (EntityVillager) entityliving; - EntityZombieVillager entityzombievillager = (EntityZombieVillager) EntityTypes.ZOMBIE_VILLAGER.a(this.world); |