mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 01:17:42 +01:00
Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly Paper Changes: 821ce25d9 Significantly improve performance of the end generation 2b2e4fd65 Add Wandering Trader spawn rate config options 7263cbca7 [CI-SKIP] [Auto] Rebuild Patches 1c63aff6d Villager resetOffers API 8d8d74a5f Patch 2 references an invalid variable e6d7bdca1 [CI-SKIP] fixed sed -i for bsd sed (#4782) 7ae47d4eb [CI-SKIP] Remove Waving banner fix (#4786)
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
From 0000000000000000000000000000000000000000 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
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityRabbit.java b/src/main/java/net/minecraft/server/EntityRabbit.java
|
||||
index 80a4a7175..25a9b7906 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityRabbit.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityRabbit.java
|
||||
@@ -297,6 +297,10 @@ public class EntityRabbit extends EntityAnimal {
|
||||
if (!this.hasCustomName()) {
|
||||
this.setCustomName(new ChatMessage(SystemUtils.a("entity", EntityRabbit.bp)));
|
||||
}
|
||||
+ // Purpur start
|
||||
+ } else if (i == 98) {
|
||||
+ setCustomName(new ChatMessage("Toast"));
|
||||
+ // Purpur end
|
||||
}
|
||||
|
||||
this.datawatcher.set(EntityRabbit.bo, i);
|
||||
@@ -318,6 +322,16 @@ public class EntityRabbit extends EntityAnimal {
|
||||
}
|
||||
|
||||
private int a(GeneratorAccess generatoraccess) {
|
||||
+ // Purpur start
|
||||
+ World world = generatoraccess.getMinecraftWorld();
|
||||
+ if (world.purpurConfig.rabbitNaturalKiller > 0D && random.nextDouble() <= world.purpurConfig.rabbitNaturalKiller) {
|
||||
+ return 99;
|
||||
+ }
|
||||
+ if (world.purpurConfig.rabbitNaturalToast > 0D && random.nextDouble() <= world.purpurConfig.rabbitNaturalToast) {
|
||||
+ return 98;
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
BiomeBase biomebase = generatoraccess.getBiome(this.getChunkCoordinates());
|
||||
int i = this.random.nextInt(100);
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index a1c0dc687..fe82dc392 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -144,6 +144,13 @@ public class PurpurWorldConfig {
|
||||
illusionerFollowRange = getDouble("mobs.illusioner.follow-range", illusionerFollowRange);
|
||||
}
|
||||
|
||||
+ public double rabbitNaturalToast = 0.0D;
|
||||
+ public double rabbitNaturalKiller = 0.0D;
|
||||
+ private void rabbitSettings() {
|
||||
+ rabbitNaturalToast = getDouble("mobs.rabbit.spawn-toast-chance", rabbitNaturalToast);
|
||||
+ rabbitNaturalKiller = getDouble("mobs.rabbit.spawn-killer-rabbit-chance", rabbitNaturalKiller);
|
||||
+ }
|
||||
+
|
||||
public int villagerBrainTicks = 1;
|
||||
public boolean villagerUseBrainTicksOnlyWhenLagging = true;
|
||||
private void villagerSettings() {
|
||||
Reference in New Issue
Block a user