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: 4a97a7ca Add option to disable pillager patrols (#2626) 23e53aab Backport MC-160177 fix from 1.15 (#2702) 45089d59 Update upstream CB 761c24fa Fix stuck in sneak when changing worlds (MC-10657) (#2627)
43 lines
1.9 KiB
Diff
43 lines
1.9 KiB
Diff
From 726de26909cd6f0643a8b781cbb5ddecd0929e3a 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 d48610df3a..498c453d71 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 26ac853132..3e96f63dbe 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
@@ -244,6 +244,11 @@ public class PurpurConfig {
|
|
pigmenDontTargetUnlessHit = getBoolean("settings.mobs.pigmen.dont-target-unless-hit", pigmenDontTargetUnlessHit);
|
|
}
|
|
|
|
+ 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.24.0.rc1
|
|
|