mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
Upstream has released updates that appears to apply and compile correctly Paper Changes: 7caed1a8 [CI-SKIP] Rebuild patches 777073a5 Check horse entity validity in container interactions (#2584) d69fe6c5 Fix zero-tick instant grow farms MC-113809 (#2559) c68dbb86 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#2576) 1e521994 Update Paperclip 30f9955e Fix race conditions in flush allowing for previously scheduled tasks to execute later than the flush call (#2548) 9e1620e3 Improve save logic (#2485) 72860501 [CI-SKIP] Fix duplicate patch number 87355875 Fix nether portal frame creation (#2546) 26acc9b7 Re-add flat bedrock config option
43 lines
1.9 KiB
Diff
43 lines
1.9 KiB
Diff
From 31a6fc0ab24d9bf15a8fb32cf890d85e67e5e960 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
Date: Sat, 31 Aug 2019 17:24:41 -0500
|
|
Subject: [PATCH] Add killer rabbit natural spawn chance
|
|
|
|
---
|
|
src/main/java/net/minecraft/server/EntityRabbit.java | 2 ++
|
|
src/main/java/net/pl3x/purpur/PurpurConfig.java | 5 +++++
|
|
2 files changed, 7 insertions(+)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityRabbit.java b/src/main/java/net/minecraft/server/EntityRabbit.java
|
|
index d48610df3..498c453d7 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityRabbit.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityRabbit.java
|
|
@@ -328,6 +328,8 @@ public class EntityRabbit extends EntityAnimal {
|
|
}
|
|
|
|
private int a(GeneratorAccess generatoraccess) {
|
|
+ if (net.pl3x.purpur.PurpurConfig.killerRabbitChance > 0D && net.pl3x.purpur.PurpurConfig.killerRabbitChance > random.nextDouble()) return 99; // Purpur
|
|
+
|
|
BiomeBase biomebase = generatoraccess.getBiome(new BlockPosition(this));
|
|
int i = this.random.nextInt(100);
|
|
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
index 46c31ad1c..d03b96bcc 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
@@ -247,6 +247,11 @@ public class PurpurConfig {
|
|
disablePillagerPatrols = getBoolean("settings.mobs.pillager.disable-patrols", disablePillagerPatrols);
|
|
}
|
|
|
|
+ public static double killerRabbitChance = 0.0D;
|
|
+ private static void rabbitSettings() {
|
|
+ killerRabbitChance = getDouble("settings.mobs.rabbit.spawn-killer-rabbit-chance", killerRabbitChance);
|
|
+ }
|
|
+
|
|
public static boolean snowmanDropsPumpkin = false;
|
|
public static boolean snowmanPumpkinPutBack = false;
|
|
private static void snowmansSettings() {
|
|
--
|
|
2.23.0.rc1
|
|
|