mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 01:17:42 +01:00
temporarily remove pufferfish, closes #1625
This commit is contained in:
42
patches/server/0077-Add-vindicator-johnny-spawn-chance.patch
Normal file
42
patches/server/0077-Add-vindicator-johnny-spawn-chance.patch
Normal file
@@ -0,0 +1,42 @@
|
||||
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 065bd31afe948c1ffab4da6f2a236cd931e75259..7f414f74c315db67a8e8a3d3636811abe733f62a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
|
||||
@@ -158,6 +158,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 35ce3c0385f72feea1a0741ee055994f5cf0190a..a4c20f7b679150425b192a9e4411fa987aed8e1f 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -1789,6 +1789,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);
|
||||
@@ -1800,6 +1801,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;
|
||||
Reference in New Issue
Block a user