
crop Spawner
You are a senior Minecraft Paper plugin developer. Create a COMPLETE and PRODUCTION-READY Paper plugin for Minecraft Paper 1.21.10 using Java 21. Plugin...
00—spigotServer1.21.10mod
What was built
- CropSpawner is a Paper 1.21.10 plugin that adds logical crop spawner blocks (WHEAT, CARROT, POTATO, BEETROOT, SUGAR_CANE) with persistent virtual storage and stacking up to a configurable cap.
- Production runs on the main thread; output = base items per crop * level multiplier * stack size, on a per-crop interval. Output pauses while chunks are unloaded.
- Spawner blocks are marked via
PersistentDataContainerand saved inplugins/CropSpawner/data.ymlso inventory, stack, and levels survive restarts. - If a chest/trapped chest or hopper is directly underneath, items auto-insert; otherwise they go into the spawner’s internal storage (capped by config) and overflow drops at the block.
Using the plugin
- Place a provided spawner item (Material: spawner). Right-click the placed block to open the GUI; right-click with another matching spawner item stacks it (level must match).
- GUI (27 slots): slot 10 = level info, 12 = stack info, 14 = production rate, 22 = stored item withdraw (left-click: 64 items, shift-click: all). Other slots are locked filler to prevent dupes.
- Commands:
/cropspawner give <player> <type> <amount> [level],/cropspawner open(target block within 6 blocks),/cropspawner upgrade(target block),/cropspawner reload. Permissions:cropspawner.usefor interaction,cropspawner.adminfor admin commands.
Configuration
config.ymlcontrols per-cropitemsandinterval-seconds,level-multipliers,limits.max-stack-per-block,limits.max-spawners-per-chunk, andlimits.max-internal-storage.messages.ymlholds all player-facing text with color codes; reload via/cropspawner reload.
Notes and considerations
- Breaking a spawner drops its stack as items and any stored crops. Chunk limits count total stacked spawners, not just block count.
- Chunk load/unload events reset production timers so farms do not fast-forward while offline.
- No economy costs are included for upgrades; leveling is unrestricted aside from the configured max multiplier entries.