mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: 98a702c7d [CI-SKIP] [Auto] Rebuild Patches cab361600 Expose LivingEntity hurt direction 7ef05fbd8 Do not perform neighbour updates when using debug stick (Fixes #2134)
This commit is contained in:
39
patches/server/0101-Add-vindicator-johnny-spawn-chance.patch
Normal file
39
patches/server/0101-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 c0d26aa9dcd02c44d744b10e18609857ada95889..8f812aa9133e29d1450ab210fec68b23ca4d3042 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 48c8cbf95be6bea2ceec48fe33d4219eab65bc0c..a26529e932d442c9c9f4ca6a7eff5e3c5f842190 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