Option Ocelot Spawn Under Sea Level

This commit is contained in:
William Blake Galbreath
2025-01-12 17:49:39 -08:00
committed by granny
parent b8520cb85d
commit ebcfbeacc5
3 changed files with 13 additions and 39 deletions

View File

@@ -0,0 +1,11 @@
--- a/net/minecraft/world/entity/animal/Ocelot.java
+++ b/net/minecraft/world/entity/animal/Ocelot.java
@@ -232,7 +_,7 @@
public boolean checkSpawnObstruction(LevelReader level) {
if (level.isUnobstructed(this) && !level.containsAnyLiquid(this.getBoundingBox())) {
BlockPos blockPos = this.blockPosition();
- if (blockPos.getY() < level.getSeaLevel()) {
+ if (!level().purpurConfig.ocelotSpawnUnderSeaLevel && blockPos.getY() < level.getSeaLevel()) { // Purpur - Option Ocelot Spawn Under Sea Level
return false;
}

View File

@@ -2158,6 +2158,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);
@@ -2172,6 +2173,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;