mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@f9c7f2a Begin switching to JSpecify annotations (#11448) PaperMC/Paper@e3c8a8e Add PlayerInsertLecternBookEvent [1.20 port] (#7305) PaperMC/Paper@b410fe8 Configurable per-world void damage offset/damage(#11436) PaperMC/Paper@ea00be3 Do not NPE on uuid resolution in player profile (#11449) PaperMC/Paper@ba3c29b Finish converting all events to jspecify annotations PaperMC/Paper@e7e1ab5 Finish converting most of the undeprecated api to jspecify PaperMC/Paper@69ffbec Fix hex color check PaperMC/Paper@709f0f2 Use components properly in ProfileWhitelistVerifyEvent (#11456) PaperMC/Paper@fb76840 [ci skip] Add section on nullability annotations (#11461) PaperMC/Paper@7cd4f2c Check if leash tag has a uuid
43 lines
2.4 KiB
Diff
43 lines
2.4 KiB
Diff
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 e5c6baf199235812f7b4fcec20145d7146737224..f8c2911496aa18e8e2b589309e9cdd78d679f004 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
|
|
@@ -152,6 +152,11 @@ public class Vindicator extends AbstractIllager {
|
|
RandomSource randomSource = world.getRandom();
|
|
this.populateDefaultEquipmentSlots(randomSource, difficulty);
|
|
this.populateDefaultEquipmentEnchantments(world, randomSource, difficulty);
|
|
+ // Purpur start
|
|
+ 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 a3e40d92a32e214a69b605740bcbe639211bedb6..cf8165b5a5a1b82c966ae891d95e0093bf76526f 100644
|
|
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
@@ -1774,6 +1774,7 @@ public class PurpurWorldConfig {
|
|
public boolean vindicatorControllable = true;
|
|
public double vindicatorMaxHealth = 24.0D;
|
|
public double vindicatorScale = 1.0D;
|
|
+ public double vindicatorJohnnySpawnChance = 0D;
|
|
private void vindicatorSettings() {
|
|
vindicatorRidable = getBoolean("mobs.vindicator.ridable", vindicatorRidable);
|
|
vindicatorRidableInWater = getBoolean("mobs.vindicator.ridable-in-water", vindicatorRidableInWater);
|
|
@@ -1785,6 +1786,7 @@ public class PurpurWorldConfig {
|
|
}
|
|
vindicatorMaxHealth = getDouble("mobs.vindicator.attributes.max_health", vindicatorMaxHealth);
|
|
vindicatorScale = Mth.clamp(getDouble("mobs.vindicator.attributes.scale", vindicatorScale), 0.0625D, 16.0D);
|
|
+ vindicatorJohnnySpawnChance = getDouble("mobs.vindicator.johnny.spawn-chance", vindicatorJohnnySpawnChance);
|
|
}
|
|
|
|
public boolean wanderingTraderRidable = false;
|