mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: 466820160 Upstream Update (#5211) 2a0ee4b65 Add support for hex color codes in console 4e958e229 We're going on an Adventure! (#4842) 1a9735611 Stop loop when flags set to false (#5101) a5928db4a [Auto] Updated Upstream (CraftBukkit)
This commit is contained in:
39
patches/server/0094-Add-vindicator-johnny-spawn-chance.patch
Normal file
39
patches/server/0094-Add-vindicator-johnny-spawn-chance.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
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 4761ddfedeed54e79788a6f60f06a805efd60ab1..23b350f793539672b6990327ed52e9bb3bdbf54e 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVindicator.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVindicator.java
|
||||
@@ -82,6 +82,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 40a248746ea53640697395a155c18215fd2bbe51..87c68707aaab2d0e49d4e9c17de94b28a4324799 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);
|
||||
Reference in New Issue
Block a user