mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 17:37:42 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: b79bc31 Fix MerchantOffer BuyB Only AssertionError (#6206) d6c81c8 Don't apply cramming damage to players (#5903) 12942dc Add rate options and timings for sensors and behaviors (#6027) fc47872 Use mapped names for sensor and behavior timings/config (#6228) c75a837 Don't expose ASM in API (#6229) c225bf9 Fix book title and author being improperly serialized as components (#6190) f25facb Update email & name (DenWav) 44516b1 [ci skip] Put mappings util in a separate class to the stacktrace deobfuscator
This commit is contained in:
@@ -1,51 +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 58c1f069281866488f0b83f2c6c2de715b7ff98c..cd05aad2e21d37e2e75866d061256e881f6b124a 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -1441,6 +1441,7 @@ public class PurpurWorldConfig {
|
||||
public boolean vindicatorRidable = false;
|
||||
public boolean vindicatorRidableInWater = false;
|
||||
public double vindicatorMaxHealth = 24.0D;
|
||||
+ public double vindicatorJohnnySpawnChance = 0D;
|
||||
private void vindicatorSettings() {
|
||||
vindicatorRidable = getBoolean("mobs.vindicator.ridable", vindicatorRidable);
|
||||
vindicatorRidableInWater = getBoolean("mobs.vindicator.ridable-in-water", vindicatorRidableInWater);
|
||||
@@ -1450,6 +1451,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 boolean wanderingTraderRidable = false;
|
||||
Reference in New Issue
Block a user