mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 17:37:42 +01:00
progress
This commit is contained in:
@@ -1,47 +0,0 @@
|
||||
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 76e6ea34db3942e9dd7646ad7ca1259f4387a4d8..9096c40ad5784d9097e889f0f43b6cf1f60c0692 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
|
||||
@@ -7,6 +7,7 @@ import java.util.function.Predicate;
|
||||
import javax.annotation.Nullable;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.Component;
|
||||
+import net.minecraft.network.chat.TranslatableComponent;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
@@ -147,6 +148,12 @@ public class Vindicator extends AbstractIllager {
|
||||
((GroundPathNavigation)this.getNavigation()).setCanOpenDoors(true);
|
||||
this.populateDefaultEquipmentSlots(difficulty);
|
||||
this.populateDefaultEquipmentEnchantments(difficulty);
|
||||
+ // Purpur start
|
||||
+ Level level = world.getMinecraftWorld();
|
||||
+ if (level.purpurConfig.vindicatorJohnnySpawnChance > 0D && random.nextDouble() <= level.purpurConfig.vindicatorJohnnySpawnChance) {
|
||||
+ setCustomName(new TranslatableComponent("Johnny"));
|
||||
+ }
|
||||
+ // Purpur end
|
||||
return spawnGroupData;
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 386bd354d0c5ff9c2570634c9d34a121f9bf8641..b5dab55aa71c56b9c7f23f07420cb3697f47ab40 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -972,9 +972,11 @@ public class PurpurWorldConfig {
|
||||
|
||||
public boolean vindicatorRidable = false;
|
||||
public boolean vindicatorRidableInWater = false;
|
||||
+ public double vindicatorJohnnySpawnChance = 0D;
|
||||
private void vindicatorSettings() {
|
||||
vindicatorRidable = getBoolean("mobs.vindicator.ridable", vindicatorRidable);
|
||||
vindicatorRidableInWater = getBoolean("mobs.vindicator.ridable-in-water", vindicatorRidableInWater);
|
||||
+ vindicatorJohnnySpawnChance = getDouble("mobs.vindicator.johnny.spawn-chance", vindicatorJohnnySpawnChance);
|
||||
}
|
||||
|
||||
public boolean wanderingTraderRidable = false;
|
||||
Reference in New Issue
Block a user