save stuff here

This commit is contained in:
Ben Kerllenevich
2023-06-09 00:01:03 -04:00
parent 0b3c94c72d
commit 8768f54932
159 changed files with 4276 additions and 3663 deletions

View File

@@ -5,7 +5,7 @@ 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 fdbcf72f35b6801fed4db127710a72579c823fe1..db832e9c8287d0f62db65ff3a2d2625541758762 100644
index 40858ac2a9b58108472748d0ef2c2fd5ef5cfd98..2a5b6b94b15bf066b5722e7a4f782bc87f9debf4 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
@@ -154,6 +154,12 @@ public class Vindicator extends AbstractIllager {
@@ -14,7 +14,7 @@ index fdbcf72f35b6801fed4db127710a72579c823fe1..db832e9c8287d0f62db65ff3a2d26255
this.populateDefaultEquipmentEnchantments(randomSource, difficulty);
+ // Purpur start
+ Level level = world.getMinecraftWorld();
+ if (level.purpurConfig.vindicatorJohnnySpawnChance > 0D && random.nextDouble() <= level.purpurConfig.vindicatorJohnnySpawnChance) {
+ if (level().purpurConfig.vindicatorJohnnySpawnChance > 0D && random.nextDouble() <= level().purpurConfig.vindicatorJohnnySpawnChance) {
+ setCustomName(Component.translatable("Johnny"));
+ }
+ // Purpur end
@@ -22,22 +22,22 @@ index fdbcf72f35b6801fed4db127710a72579c823fe1..db832e9c8287d0f62db65ff3a2d26255
}
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 37f72c2812c8041a36fd7ec117e9274a8f2817c0..2af26908978d364e24a6ebbd2ac3a7456f2d0cc3 100644
index e59f52a32f6300f5d2048a27bfa590f26432cdd0..66162ef0ed12cd0bc4c705758dbbca19c3952d19 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1222,6 +1222,7 @@ public class PurpurWorldConfig {
}
@@ -1634,6 +1634,7 @@ public class PurpurWorldConfig {
public boolean vindicatorRidableInWater = true;
public boolean vindicatorControllable = true;
public double vindicatorMaxHealth = 24.0D;
+ public double vindicatorJohnnySpawnChance = 0D;
private void vindicatorSettings() {
if (PurpurConfig.version < 10) {
double oldValue = getDouble("mobs.vindicator.attributes.max-health", vindicatorMaxHealth);
@@ -1229,6 +1230,7 @@ public class PurpurWorldConfig {
vindicatorRidable = getBoolean("mobs.vindicator.ridable", vindicatorRidable);
vindicatorRidableInWater = getBoolean("mobs.vindicator.ridable-in-water", vindicatorRidableInWater);
@@ -1644,6 +1645,7 @@ public class PurpurWorldConfig {
set("mobs.vindicator.attributes.max_health", oldValue);
}
vindicatorMaxHealth = getDouble("mobs.vindicator.attributes.max_health", vindicatorMaxHealth);
+ vindicatorJohnnySpawnChance = getDouble("mobs.vindicator.johnny.spawn-chance", vindicatorJohnnySpawnChance);
}
public double wanderingTraderMaxHealth = 20.0D;
public boolean wanderingTraderRidable = false;