Плагины/ResourceSpawner
ResourceSpawner

ResourceSpawner

Randomly generates temporary resource nodes and other structures in an existing world

159
3

What ResourceSpawner does

The short version

ResourceSpawner spawns things at random locations, and optionally decays them after an amount of time

A grassy field with bunches of iron ore generating an dissolving at random. An example resource field, with resource nodes spawning and decaying at an unreasonably high rate

(There is no limit to the size of the spawned structures)

The long version

Each cycle, each Resource Spawner will:

  • If the structure limit is not met:
  • Choose a World Provider, and use it to pick a world.
  • Choose a Location Provider, and use it to pick a location.
  • Choose a Spawn Provider, and check a set of Conditions.
  • If all conditions are met, use it to spawn something.

World Providers

World providers provide a list of worlds a Resource Spawner may operate in.

Location Providers

Location providers provide an area a Resource Spawner may operate in, such as a cuboid, sphere, etc. Some location providers offer Distributions, to allow generation bias towards certain areas

Spawn Providers

Spawn providers spawn something in the location, such as a structure or entity

Structure Providers

Structure Providers are a special type of Spawn Provider that will spawn a structure. Since structure generation speed is limited, you can choose a Structure Sorter to define in what order the blocks will spawn or decay

Structure Providers allow you to schedule the structure to decay after a given amount of time. This time can be reset by Triggers

Triggers

Triggers will reset the timer on a structure provider when a specific event happens, such as a block being broken or a player moving nearby. Triggers can be set to reset the time to any value.

Conditions

Conditions check the area around a spawn for specific features before allowing it to continue.

For even more details, see the Features List section

Lag-free

All significant actions in ResourceSpawner, from scanning a large area to spawning a single entity, are limited to spend no more than a given amount of time per tick. This is configurable, in nanoseconds, for each resource spawner In addition, resource spawners can be set to only tick at specific intervals

Extensive Plugin API

Plugins can register new World Providers, Location Providers, Spawn Providers, Conditions, Structure Sorters, Triggers, and Distributions by listening for the ResourceSpawnerInitializationEvent and using its register methods.

For examples of these, see the Source Code

Note: Your plugin should use itself for the NamespacedKey, not ResourceSpawner

Hjson Configuration

ResourceSpawner uses Hjson for its configuration to avoid the messiness of YAML, while still providing a reasonably user-friendly configuration file

Basic configuration format
{
    debug: false //this line is optional, but set it to true to enable an excessive amount of console output for debugging (This may slow down the plugin)
    resource_spawners: [
        {
            //a resource spawner
        }
        {
            //another resource spawner
        }
    ]
}

For the formats of Resource Spawners and everything else, see the Features List section

Patreon

My plugins will always be free, but donations would be very much appreciated :)

Consider supporting me on patreon:

patreon.com/thizthizzydizzy

Discord

https://discord.gg/dhcPSMt

Features List

For full documentation, see GitHub

Совместимость

Minecraft: Java Edition

1.20–1.211.18–1.19.41.16–1.17.1

Платформы

Поддерживаемые окружения

Сервер

Детали

Лицензия:GPL-3.0-only
Опубликован:1 год назад
Обновлён:1 год назад
Главная