mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-31 22:22:49 +00:00
Add configuration options for water_ambient spawning
This commit is contained in:
parent
8edeffe67d
commit
edc7a378c9
3 changed files with 124 additions and 0 deletions
|
@ -397,6 +397,28 @@ public final class Bukkit {
|
||||||
return server.getTicksPerAmbientSpawns();
|
return server.getTicksPerAmbientSpawns();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the default ticks per water ambient mob spawns value.
|
||||||
|
* <p>
|
||||||
|
* <b>Example Usage:</b>
|
||||||
|
* <ul>
|
||||||
|
* <li>A value of 1 will mean the server will attempt to spawn water ambient mobs
|
||||||
|
* every tick.
|
||||||
|
* <li>A value of 400 will mean the server will attempt to spawn water ambient mobs
|
||||||
|
* 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, ambient mobs spawning will be disabled.
|
||||||
|
* <p>
|
||||||
|
* Minecraft default: 1.
|
||||||
|
*
|
||||||
|
* @return the default ticks per water ambient mobs spawn value
|
||||||
|
*/
|
||||||
|
public static int getTicksPerWaterAmbientSpawns() {
|
||||||
|
return server.getTicksPerAmbientSpawns();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a player object by the given username.
|
* Gets a player object by the given username.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -1103,6 +1125,16 @@ public final class Bukkit {
|
||||||
return server.getWaterAnimalSpawnLimit();
|
return server.getWaterAnimalSpawnLimit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets user-specified limit for number of water ambient mobs that can spawn
|
||||||
|
* in a chunk.
|
||||||
|
*
|
||||||
|
* @return the water ambient spawn limit
|
||||||
|
*/
|
||||||
|
public static int getWaterAmbientSpawnLimit() {
|
||||||
|
return server.getAmbientSpawnLimit();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets user-specified limit for number of ambient mobs that can spawn in
|
* Gets user-specified limit for number of ambient mobs that can spawn in
|
||||||
* a chunk.
|
* a chunk.
|
||||||
|
|
|
@ -314,6 +314,26 @@ public interface Server extends PluginMessageRecipient {
|
||||||
*/
|
*/
|
||||||
public int getTicksPerWaterSpawns();
|
public int getTicksPerWaterSpawns();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the default ticks per water ambient mob spawns value.
|
||||||
|
* <p>
|
||||||
|
* <b>Example Usage:</b>
|
||||||
|
* <ul>
|
||||||
|
* <li>A value of 1 will mean the server will attempt to spawn water ambient mobs
|
||||||
|
* every tick.
|
||||||
|
* <li>A value of 400 will mean the server will attempt to spawn water ambient mobs
|
||||||
|
* 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, ambient mobs spawning will be disabled.
|
||||||
|
* <p>
|
||||||
|
* Minecraft default: 1.
|
||||||
|
*
|
||||||
|
* @return the default ticks per water ambient mobs spawn value
|
||||||
|
*/
|
||||||
|
public int getTicksPerWaterAmbientSpawns();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the default ticks per ambient mob spawns value.
|
* Gets the default ticks per ambient mob spawns value.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -920,6 +940,14 @@ public interface Server extends PluginMessageRecipient {
|
||||||
*/
|
*/
|
||||||
int getWaterAnimalSpawnLimit();
|
int getWaterAnimalSpawnLimit();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets user-specified limit for number of water ambient mobs that can spawn
|
||||||
|
* in a chunk.
|
||||||
|
*
|
||||||
|
* @return the water ambient spawn limit
|
||||||
|
*/
|
||||||
|
int getWaterAmbientSpawnLimit();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets user-specified limit for number of ambient mobs that can spawn in
|
* Gets user-specified limit for number of ambient mobs that can spawn in
|
||||||
* a chunk.
|
* a chunk.
|
||||||
|
|
|
@ -1690,6 +1690,51 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||||
*/
|
*/
|
||||||
public void setTicksPerWaterSpawns(int ticksPerWaterSpawns);
|
public void setTicksPerWaterSpawns(int ticksPerWaterSpawns);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the default ticks per water ambient mob spawns value.
|
||||||
|
* <p>
|
||||||
|
* <b>Example Usage:</b>
|
||||||
|
* <ul>
|
||||||
|
* <li>A value of 1 will mean the server will attempt to spawn water ambient mobs
|
||||||
|
* every tick.
|
||||||
|
* <li>A value of 400 will mean the server will attempt to spawn water ambient mobs
|
||||||
|
* 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, ambient mobs spawning will be disabled.
|
||||||
|
* <p>
|
||||||
|
* Minecraft default: 1.
|
||||||
|
*
|
||||||
|
* @return the default ticks per water ambient mobs spawn value
|
||||||
|
*/
|
||||||
|
public long getTicksPerWaterAmbientSpawns();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the world's ticks per water ambient mob spawns value
|
||||||
|
* <p>
|
||||||
|
* This value determines how many ticks there are between attempts to
|
||||||
|
* spawn water ambient mobs.
|
||||||
|
* <p>
|
||||||
|
* <b>Example Usage:</b>
|
||||||
|
* <ul>
|
||||||
|
* <li>A value of 1 will mean the server will attempt to spawn water ambient mobs in
|
||||||
|
* this world on every tick.
|
||||||
|
* <li>A value of 400 will mean the server will attempt to spawn weater ambient mobs
|
||||||
|
* 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 ambient mobs spawning will be disabled for this world.
|
||||||
|
* <p>
|
||||||
|
* Minecraft default: 1.
|
||||||
|
*
|
||||||
|
* @param ticksPerAmbientSpawns the ticks per water ambient mob spawns value you
|
||||||
|
* want to set the world to
|
||||||
|
*/
|
||||||
|
public void setTicksPerWaterAmbientSpawns(int ticksPerAmbientSpawns);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the world's ticks per ambient mob spawns value
|
* Gets the world's ticks per ambient mob spawns value
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -1796,6 +1841,25 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||||
*/
|
*/
|
||||||
void setWaterAnimalSpawnLimit(int limit);
|
void setWaterAnimalSpawnLimit(int limit);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets user-specified limit for number of water ambient mobs that can spawn
|
||||||
|
* in a chunk.
|
||||||
|
*
|
||||||
|
* @return the water ambient spawn limit
|
||||||
|
*/
|
||||||
|
int getWaterAmbientSpawnLimit();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the limit for number of water ambient mobs 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 setWaterAmbientSpawnLimit(int limit);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the limit for number of ambient mobs that can spawn in a chunk in
|
* Gets the limit for number of ambient mobs that can spawn in a chunk in
|
||||||
* this world
|
* this world
|
||||||
|
|
Loading…
Add table
Reference in a new issue