mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Fix rabbits from crashing servers
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From eca31a254b26c52526071806df6ea50b9504ff34 Mon Sep 17 00:00:00 2001
|
||||
From 2839caf1f2697901f0c4e4fc62b5c04ee20f94c8 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 31 Aug 2019 17:47:11 -0500
|
||||
Subject: [PATCH] Rabbit naturally spawn toast and killer
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] Rabbit naturally spawn toast and killer
|
||||
2 files changed, 18 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityRabbit.java b/src/main/java/net/minecraft/server/EntityRabbit.java
|
||||
index 9040ab1c5..7ffa90af8 100644
|
||||
index 9040ab1c5..0232226f0 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityRabbit.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityRabbit.java
|
||||
@@ -364,6 +364,10 @@ public class EntityRabbit extends EntityAnimal {
|
||||
@@ -28,7 +28,7 @@ index 9040ab1c5..7ffa90af8 100644
|
||||
|
||||
private int a(GeneratorAccess generatoraccess) {
|
||||
+ // Purpur start
|
||||
+ World world = (World) generatoraccess;
|
||||
+ World world = generatoraccess.getMinecraftWorld();
|
||||
+ if (world.purpurConfig.rabbitNaturalKiller > 0D && random.nextDouble() <= world.purpurConfig.rabbitNaturalKiller) {
|
||||
+ return 99;
|
||||
+ }
|
||||
|
||||
Reference in New Issue
Block a user