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
50 lines
2.3 KiB
Diff
50 lines
2.3 KiB
Diff
From 2d0870d724ac31c6cee1b48429f036a548d40fcb 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] Add option to spawn Toast
|
|
|
|
---
|
|
src/main/java/net/minecraft/server/EntityRabbit.java | 3 ++-
|
|
src/main/java/net/pl3x/purpur/PurpurConfig.java | 2 ++
|
|
2 files changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityRabbit.java b/src/main/java/net/minecraft/server/EntityRabbit.java
|
|
index 498c453d7..41d8d1ccb 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityRabbit.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityRabbit.java
|
|
@@ -300,7 +300,7 @@ public class EntityRabbit extends EntityAnimal {
|
|
if (!this.hasCustomName()) {
|
|
this.setCustomName(new ChatMessage(SystemUtils.a("entity", EntityRabbit.bA), new Object[0]));
|
|
}
|
|
- }
|
|
+ } else if (i == 98) setCustomName(new ChatMessage("Toast")); // Purpur
|
|
|
|
this.datawatcher.set(EntityRabbit.bz, i);
|
|
}
|
|
@@ -329,6 +329,7 @@ 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
|
|
+ if (net.pl3x.purpur.PurpurConfig.toastRabbitChance > 0D && net.pl3x.purpur.PurpurConfig.toastRabbitChance > random.nextDouble()) return 98; // 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 d03b96bcc..644ad14b3 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
@@ -248,8 +248,10 @@ public class PurpurConfig {
|
|
}
|
|
|
|
public static double killerRabbitChance = 0.0D;
|
|
+ public static double toastRabbitChance = 0.0D;
|
|
private static void rabbitSettings() {
|
|
killerRabbitChance = getDouble("settings.mobs.rabbit.spawn-killer-rabbit-chance", killerRabbitChance);
|
|
+ toastRabbitChance = getDouble("settings.mobs.rabbit.spawn-toast-chance", toastRabbitChance);
|
|
}
|
|
|
|
public static boolean snowmanDropsPumpkin = false;
|
|
--
|
|
2.23.0.rc1
|
|
|