mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@5436d44 Deprecate several Keyed#getKey methods (#10357) PaperMC/Paper@a7f1dc6 Change online mode default for Velocity configuration (#10413) PaperMC/Paper@37db2d7 [ci skip] Update book page/char limit for book meta doc (#10415) PaperMC/Paper@526795b Update patches to handle vineflower decompiler (#10406) PaperMC/Paper@8fe90de [ci skip] Referenced InventoryDragEvent in documentation of InventoryClickEvent (#10395) PaperMC/Paper@46d462b Fix StackOverflowException thrown on shutdown (Fixes #10404) (#10408) PaperMC/Paper@f061e76 Fix hit criteria advancement triggered before changing state (#10409) PaperMC/Paper@3263470 Add color transition and clone functions to ParticleBuilder (#10342) PaperMC/Paper@4445d23 Deprecate ItemStack#setType & add ItemStack#withType (#10290)
40 lines
2.3 KiB
Diff
40 lines
2.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
Date: Fri, 21 Jul 2023 11:04:47 -0500
|
|
Subject: [PATCH] Option Ocelot Spawn Under Sea Level
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
|
|
index af275fc579d66bb098c08e88e4186846a1174c02..3c5f25300d1c7800144a459cc8bf598352a62a35 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
|
|
@@ -295,7 +295,7 @@ public class Ocelot extends Animal {
|
|
if (world.isUnobstructed(this) && !world.containsAnyLiquid(this.getBoundingBox())) {
|
|
BlockPos blockposition = this.blockPosition();
|
|
|
|
- if (blockposition.getY() < world.getSeaLevel()) {
|
|
+ if (!level().purpurConfig.ocelotSpawnUnderSeaLevel && blockposition.getY() < world.getSeaLevel()) {
|
|
return false;
|
|
}
|
|
|
|
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
index a35837a4d089658b4a19ebf63690e5371e1515cd..43c6f7bfac08c31e19df70fb92cd611fbbe03b30 100644
|
|
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
@@ -2091,6 +2091,7 @@ public class PurpurWorldConfig {
|
|
public int ocelotBreedingTicks = 6000;
|
|
public boolean ocelotTakeDamageFromWater = false;
|
|
public boolean ocelotAlwaysDropExp = false;
|
|
+ public boolean ocelotSpawnUnderSeaLevel = false;
|
|
private void ocelotSettings() {
|
|
ocelotRidable = getBoolean("mobs.ocelot.ridable", ocelotRidable);
|
|
ocelotRidableInWater = getBoolean("mobs.ocelot.ridable-in-water", ocelotRidableInWater);
|
|
@@ -2104,6 +2105,7 @@ public class PurpurWorldConfig {
|
|
ocelotBreedingTicks = getInt("mobs.ocelot.breeding-delay-ticks", ocelotBreedingTicks);
|
|
ocelotTakeDamageFromWater = getBoolean("mobs.ocelot.takes-damage-from-water", ocelotTakeDamageFromWater);
|
|
ocelotAlwaysDropExp = getBoolean("mobs.ocelot.always-drop-exp", ocelotAlwaysDropExp);
|
|
+ ocelotSpawnUnderSeaLevel = getBoolean("mobs.ocelot.spawn-below-sea-level", ocelotSpawnUnderSeaLevel);
|
|
}
|
|
|
|
public boolean pandaRidable = false;
|