mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-31 21:37:39 +01:00
#662: Support for configuring Water Underground Creatures spawn settings
By: Doc <nachito94@msn.com>
This commit is contained in:
parent
f4b28573d2
commit
8b6e67635a
@ -451,6 +451,27 @@ public final class Bukkit {
|
||||
public static int getTicksPerWaterAmbientSpawns() {
|
||||
return server.getTicksPerAmbientSpawns();
|
||||
}
|
||||
/**
|
||||
* Gets the default ticks per water underground creature spawns value.
|
||||
* <p>
|
||||
* <b>Example Usage:</b>
|
||||
* <ul>
|
||||
* <li>A value of 1 will mean the server will attempt to spawn water underground creature
|
||||
* every tick.
|
||||
* <li>A value of 400 will mean the server will attempt to spawn water underground creature
|
||||
* every 400th tick.
|
||||
* <li>A value below 0 will be reset back to Minecraft's default.
|
||||
* </ul>
|
||||
* <p>
|
||||
* <b>Note:</b> If set to 0, water underground creature spawning will be disabled.
|
||||
* <p>
|
||||
* Minecraft default: 1.
|
||||
*
|
||||
* @return the default ticks per water underground creature spawn value
|
||||
*/
|
||||
public static int getTicksPerWaterUndergroundCreatureSpawns() {
|
||||
return server.getTicksPerWaterUndergroundCreatureSpawns();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a player object by the given username.
|
||||
@ -1234,6 +1255,15 @@ public final class Bukkit {
|
||||
return server.getAmbientSpawnLimit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user-specified limit for number of water creature underground that can spawn
|
||||
* in a chunk.
|
||||
* @return the water underground creature limit
|
||||
*/
|
||||
public static int getWaterUndergroundCreatureSpawnLimit() {
|
||||
return server.getWaterUndergroundCreatureSpawnLimit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets user-specified limit for number of ambient mobs that can spawn in
|
||||
* a chunk.
|
||||
|
@ -361,6 +361,26 @@ public interface Server extends PluginMessageRecipient {
|
||||
*/
|
||||
public int getTicksPerWaterAmbientSpawns();
|
||||
|
||||
/**
|
||||
* Gets the default ticks per water underground creature spawns value.
|
||||
* <p>
|
||||
* <b>Example Usage:</b>
|
||||
* <ul>
|
||||
* <li>A value of 1 will mean the server will attempt to spawn water underground creature
|
||||
* every tick.
|
||||
* <li>A value of 400 will mean the server will attempt to spawn water underground creature
|
||||
* every 400th tick.
|
||||
* <li>A value below 0 will be reset back to Minecraft's default.
|
||||
* </ul>
|
||||
* <p>
|
||||
* <b>Note:</b> If set to 0, water underground creature spawning will be disabled.
|
||||
* <p>
|
||||
* Minecraft default: 1.
|
||||
*
|
||||
* @return the default ticks per water underground creature spawn value
|
||||
*/
|
||||
public int getTicksPerWaterUndergroundCreatureSpawns();
|
||||
|
||||
/**
|
||||
* Gets the default ticks per ambient mob spawns value.
|
||||
* <p>
|
||||
@ -1035,6 +1055,13 @@ public interface Server extends PluginMessageRecipient {
|
||||
*/
|
||||
int getWaterAmbientSpawnLimit();
|
||||
|
||||
/**
|
||||
* Get user-specified limit for number of water creature underground that can spawn
|
||||
* in a chunk.
|
||||
* @return the water underground creature limit
|
||||
*/
|
||||
int getWaterUndergroundCreatureSpawnLimit();
|
||||
|
||||
/**
|
||||
* Gets user-specified limit for number of ambient mobs that can spawn in
|
||||
* a chunk.
|
||||
|
@ -1805,6 +1805,51 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
*/
|
||||
public void setTicksPerWaterAmbientSpawns(int ticksPerAmbientSpawns);
|
||||
|
||||
/**
|
||||
* Gets the default ticks per water underground creature spawns value.
|
||||
* <p>
|
||||
* <b>Example Usage:</b>
|
||||
* <ul>
|
||||
* <li>A value of 1 will mean the server will attempt to spawn water underground creature
|
||||
* every tick.
|
||||
* <li>A value of 400 will mean the server will attempt to spawn water underground creature
|
||||
* every 400th tick.
|
||||
* <li>A value below 0 will be reset back to Minecraft's default.
|
||||
* </ul>
|
||||
* <p>
|
||||
* <b>Note:</b> If set to 0, water underground creature spawning will be disabled.
|
||||
* <p>
|
||||
* Minecraft default: 1.
|
||||
*
|
||||
* @return the default ticks per water underground creature spawn value
|
||||
*/
|
||||
public long getTicksPerWaterUndergroundCreatureSpawns();
|
||||
|
||||
/**
|
||||
* Sets the world's ticks per water underground creature spawns value
|
||||
* <p>
|
||||
* This value determines how many ticks there are between attempts to
|
||||
* spawn water underground creature.
|
||||
* <p>
|
||||
* <b>Example Usage:</b>
|
||||
* <ul>
|
||||
* <li>A value of 1 will mean the server will attempt to spawn water underground creature in
|
||||
* this world on every tick.
|
||||
* <li>A value of 400 will mean the server will attempt to spawn water underground creature
|
||||
* in this world every 400th tick.
|
||||
* <li>A value below 0 will be reset back to Minecraft's default.
|
||||
* </ul>
|
||||
* <p>
|
||||
* <b>Note:</b>
|
||||
* If set to 0, water underground creature spawning will be disabled for this world.
|
||||
* <p>
|
||||
* Minecraft default: 1.
|
||||
*
|
||||
* @param ticksPerWaterUndergroundCreatureSpawns the ticks per water underground creature spawns value you
|
||||
* want to set the world to
|
||||
*/
|
||||
public void setTicksPerWaterUndergroundCreatureSpawns(int ticksPerWaterUndergroundCreatureSpawns);
|
||||
|
||||
/**
|
||||
* Gets the world's ticks per ambient mob spawns value
|
||||
* <p>
|
||||
@ -1911,6 +1956,25 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
*/
|
||||
void setWaterAnimalSpawnLimit(int limit);
|
||||
|
||||
/**
|
||||
* Gets the limit for number of water underground creature that can spawn in a chunk in
|
||||
* this world
|
||||
*
|
||||
* @return The water underground creature spawn limit
|
||||
*/
|
||||
int getWaterUndergroundCreatureSpawnLimit();
|
||||
|
||||
/**
|
||||
* Sets the limit for number of water underground creature that can spawn in a chunk in
|
||||
* this world
|
||||
* <p>
|
||||
* <b>Note:</b> If set to a negative number the world will use the
|
||||
* server-wide spawn limit instead.
|
||||
*
|
||||
* @param limit the new mob limit
|
||||
*/
|
||||
void setWaterUndergroundCreatureSpawnLimit(int limit);
|
||||
|
||||
/**
|
||||
* Gets user-specified limit for number of water ambient mobs that can spawn
|
||||
* in a chunk.
|
||||
|
Loading…
Reference in New Issue
Block a user