Interface SpawnerDataModifier
public interface SpawnerDataModifier
Interface for accessing and modifying spawner data through the API.
This provides controlled access to spawner properties.
All properties can be modified except stackSize which is read-only.
After modifications, call
applyChanges() to recalculate and apply values.-
Method Summary
Modifier and TypeMethodDescriptionvoidApplies all pending changes and recalculates spawner values.intGets the base maximum mobs value.intGets the base maximum storage pages value.longGets the base maximum stored experience value.intGets the base minimum mobs value.longGets the base spawner delay value.intGets the spawner's maximum stack size.intGets the spawner's current stack size.setBaseMaxMobs(int baseMaxMobs) Sets the base maximum mobs value.setBaseMaxStoragePages(int baseMaxStoragePages) Sets the base maximum storage pages value.setBaseMaxStoredExp(long baseMaxStoredExp) Sets the base maximum stored experience value.setBaseMinMobs(int baseMinMobs) Sets the base minimum mobs value.setBaseSpawnerDelay(long baseSpawnerDelay) Sets the base spawner delay value.setMaxStackSize(int maxStackSize) Sets the spawner's maximum stack size.
-
Method Details
-
getStackSize
int getStackSize()Gets the spawner's current stack size. Note: Stack size is read-only and cannot be modified through this interface.- Returns:
- current stack size
-
getMaxStackSize
int getMaxStackSize()Gets the spawner's maximum stack size.- Returns:
- maximum stack size
-
setMaxStackSize
Sets the spawner's maximum stack size.- Parameters:
maxStackSize- new maximum stack size value- Returns:
- this modifier for method chaining
-
getBaseMaxStoragePages
int getBaseMaxStoragePages()Gets the base maximum storage pages value.- Returns:
- base maximum storage pages
-
setBaseMaxStoragePages
Sets the base maximum storage pages value.- Parameters:
baseMaxStoragePages- new base maximum storage pages- Returns:
- this modifier for method chaining
-
getBaseMinMobs
int getBaseMinMobs()Gets the base minimum mobs value.- Returns:
- base minimum mobs
-
setBaseMinMobs
Sets the base minimum mobs value.- Parameters:
baseMinMobs- new base minimum mobs- Returns:
- this modifier for method chaining
-
getBaseMaxMobs
int getBaseMaxMobs()Gets the base maximum mobs value.- Returns:
- base maximum mobs
-
setBaseMaxMobs
Sets the base maximum mobs value.- Parameters:
baseMaxMobs- new base maximum mobs- Returns:
- this modifier for method chaining
-
getBaseMaxStoredExp
long getBaseMaxStoredExp()Gets the base maximum stored experience value.- Returns:
- base maximum stored experience
-
setBaseMaxStoredExp
Sets the base maximum stored experience value.- Parameters:
baseMaxStoredExp- new base maximum stored experience- Returns:
- this modifier for method chaining
-
getBaseSpawnerDelay
long getBaseSpawnerDelay()Gets the base spawner delay value.- Returns:
- base spawner delay in ticks
-
setBaseSpawnerDelay
Sets the base spawner delay value.- Parameters:
baseSpawnerDelay- new base spawner delay in ticks- Returns:
- this modifier for method chaining
-
applyChanges
void applyChanges()Applies all pending changes and recalculates spawner values. This method should be called after making modifications to ensure all changes take effect properly.
-