mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 09:57:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes:26c37d99d5create random seeds for features using SecureRandom589bf2f1bfUpgrade gson to 2.8.8 (Closes #6370)0a6103597bGet entity default attributes (#6449)40057019e0Correctly inflate villager activation bounding box (#6798)e5f9241d15Left handed API (#6775)40ee63496cAdd advancement display API (#6175)9d570042edAdd ItemFactory#getMonsterEgg API (#6772)55ca459515rename method to getSpawnEggbb397ba74cAdd critical damage API (#6275)f47aeafe00Add Horse Animation API (#5599)7a0886180fAT & Mapping fixes (#6809)5553432644docs: Update gradle instructions for Java 16 (#6811) [ci skip]a1f49e4c60Fix command suggestion leak (#6592)9472d38f3cFix method name for Critical damage (#6813)
39 lines
2.2 KiB
Diff
39 lines
2.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
Date: Sat, 8 Aug 2020 16:11:51 -0500
|
|
Subject: [PATCH] Add option to disable dolphin treasure searching
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/Dolphin.java b/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
|
|
index 855ab63797baf825eeaddb4892cbe8430d47da0f..cc20ed6e1746f47351eb9b40f7b3c1a11daebd4f 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
|
|
@@ -497,6 +497,7 @@ public class Dolphin extends WaterAnimal {
|
|
|
|
@Override
|
|
public boolean canUse() {
|
|
+ if (this.dolphin.level.purpurConfig.dolphinDisableTreasureSearching) return false; // Purpur
|
|
return this.dolphin.gotFish() && this.dolphin.getAirSupply() >= 100 && this.dolphin.level.getWorld().canGenerateStructures(); // MC-151364, SPIGOT-5494: hangs if generate-structures=false
|
|
}
|
|
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index 56b5ddbab362d2c6bd9402211d30e01b94b2e891..6d1c934cb11de4a2c5c92e058f0118de4da3e2f1 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -574,6 +574,7 @@ public class PurpurWorldConfig {
|
|
public float dolphinSpitSpeed = 1.0F;
|
|
public float dolphinSpitDamage = 2.0F;
|
|
public double dolphinMaxHealth = 10.0D;
|
|
+ public boolean dolphinDisableTreasureSearching = false;
|
|
private void dolphinSettings() {
|
|
dolphinRidable = getBoolean("mobs.dolphin.ridable", dolphinRidable);
|
|
dolphinSpitCooldown = getInt("mobs.dolphin.spit.cooldown", dolphinSpitCooldown);
|
|
@@ -585,6 +586,7 @@ public class PurpurWorldConfig {
|
|
set("mobs.dolphin.attributes.max_health", oldValue);
|
|
}
|
|
dolphinMaxHealth = getDouble("mobs.dolphin.attributes.max_health", dolphinMaxHealth);
|
|
+ dolphinDisableTreasureSearching = getBoolean("mobs.dolphin.disable-treasure-searching", dolphinDisableTreasureSearching);
|
|
}
|
|
|
|
public boolean donkeyRidableInWater = false;
|