mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 00:47:42 +01:00
add back pufferfish patches
This commit is contained in:
43
patches/server/0080-Add-vindicator-johnny-spawn-chance.patch
Normal file
43
patches/server/0080-Add-vindicator-johnny-spawn-chance.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Fri, 24 Jul 2020 19:38:21 -0500
|
||||
Subject: [PATCH] Add vindicator johnny spawn chance
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
|
||||
index 40858ac2a9b58108472748d0ef2c2fd5ef5cfd98..2a5b6b94b15bf066b5722e7a4f782bc87f9debf4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
|
||||
@@ -154,6 +154,12 @@ public class Vindicator extends AbstractIllager {
|
||||
RandomSource randomSource = world.getRandom();
|
||||
this.populateDefaultEquipmentSlots(randomSource, difficulty);
|
||||
this.populateDefaultEquipmentEnchantments(randomSource, difficulty);
|
||||
+ // Purpur start
|
||||
+ Level level = world.getMinecraftWorld();
|
||||
+ if (level().purpurConfig.vindicatorJohnnySpawnChance > 0D && random.nextDouble() <= level().purpurConfig.vindicatorJohnnySpawnChance) {
|
||||
+ setCustomName(Component.translatable("Johnny"));
|
||||
+ }
|
||||
+ // Purpur end
|
||||
return spawnGroupData;
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index fcb73074a54db31cf8b5c17e8806b80666ae22c6..3d76106d20f1b03690957111d69c7dc5fa48c533 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -1644,6 +1644,7 @@ public class PurpurWorldConfig {
|
||||
public boolean vindicatorRidableInWater = true;
|
||||
public boolean vindicatorControllable = true;
|
||||
public double vindicatorMaxHealth = 24.0D;
|
||||
+ public double vindicatorJohnnySpawnChance = 0D;
|
||||
private void vindicatorSettings() {
|
||||
vindicatorRidable = getBoolean("mobs.vindicator.ridable", vindicatorRidable);
|
||||
vindicatorRidableInWater = getBoolean("mobs.vindicator.ridable-in-water", vindicatorRidableInWater);
|
||||
@@ -1654,6 +1655,7 @@ public class PurpurWorldConfig {
|
||||
set("mobs.vindicator.attributes.max_health", oldValue);
|
||||
}
|
||||
vindicatorMaxHealth = getDouble("mobs.vindicator.attributes.max_health", vindicatorMaxHealth);
|
||||
+ vindicatorJohnnySpawnChance = getDouble("mobs.vindicator.johnny.spawn-chance", vindicatorJohnnySpawnChance);
|
||||
}
|
||||
|
||||
public boolean wanderingTraderRidable = false;
|
||||
Reference in New Issue
Block a user