mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: 0514fc4e2 Add missing effects 8f5d9effd Add getMainThreadExecutor to BukkitScheduler 313b5020b Allow adding items to BlockDropItemEvent (#5093) 9a556d9da [CI-SKIP] [Auto] Rebuild Patches 72b2768ad Inline shift fields in EnumDirection (#5082) ffff53fa7 added option to disable pathfinding updates on block changes (#5123) b67081fd7 add DragonEggFormEvent (fixes #5110) (#5112) 3eefafbaf Fix javadoc build 0081ed1c4 Add javadoc step to GH Actions 01082503e Add dropLeash variable to EntityUnleashEvent (#5130) 31f9f869a [CI-SKIP] Fix YourKit links in readme, fixes #5091 8ac27aa38 [Auto] Updated Upstream (CraftBukkit) c4d9cc831 [Auto] Updated Upstream (Bukkit/CraftBukkit) d0477d326 [Auto] Updated Upstream (CraftBukkit) d9f5f7018 EntityMoveEvent (#4614)
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 80a4a71753a1fd9f62e75f0b4ea9307ed7072c4f..25a9b7906be35e981566610c7d08aa8df5050d74 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 5b8961a061c4a877cfa856f6d9f6d77060060829..f51f60110dd6117979b9d9b230065ad21135824c 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -154,6 +154,13 @@ public class PurpurWorldConfig {
|
||||
illusionerMaxHealth = getDouble("mobs.illusioner.attributes.max-health", illusionerMaxHealth);
|
||||
}
|
||||
|
||||
+ 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