mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
- Dropped "Add option to disable saving projectiles to disk" in favor of the above patch - Config migration is automatic. If "gameplay-mechanics.save-projectiles-to-disk" was set to false in purpur.yml, "projectile-load-save-per-chunk-limit" will be set to 0 in paper.yml (resulting in unchanged behaviour)
40 lines
1.9 KiB
Diff
40 lines
1.9 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/server/EntityVindicator.java b/src/main/java/net/minecraft/server/EntityVindicator.java
|
|
index c0d26aa9dc..8f812aa913 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityVindicator.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityVindicator.java
|
|
@@ -81,6 +81,12 @@ public class EntityVindicator extends EntityIllagerAbstract {
|
|
((Navigation) this.getNavigation()).a(true);
|
|
this.a(difficultydamagescaler);
|
|
this.b(difficultydamagescaler);
|
|
+ // Purpur start
|
|
+ World world = worldaccess.getMinecraftWorld();
|
|
+ if (world.purpurConfig.vindicatorJohnnySpawnChance > 0D && random.nextDouble() <= world.purpurConfig.vindicatorJohnnySpawnChance) {
|
|
+ setCustomName(new ChatMessage("Johnny"));
|
|
+ }
|
|
+ // Purpur end
|
|
return groupdataentity1;
|
|
}
|
|
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index c9ccbfed89..18703229da 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -40,6 +40,11 @@ public class PurpurWorldConfig {
|
|
}
|
|
}
|
|
|
|
+ public double vindicatorJohnnySpawnChance = 0D;
|
|
+ private void vindicatorSettings() {
|
|
+ vindicatorJohnnySpawnChance = getDouble("mobs.vindicator.johnny.spawn-chance", vindicatorJohnnySpawnChance);
|
|
+ }
|
|
+
|
|
private ConfigurationSection getConfigurationSection(String path) {
|
|
ConfigurationSection section = PurpurConfig.config.getConfigurationSection("world-settings." + worldName + "." + path);
|
|
return section != null ? section : PurpurConfig.config.getConfigurationSection("world-settings.default." + path);
|