-
Notifications
You must be signed in to change notification settings - Fork 0
Using the WorldIteratorAPI
PukPukov edited this page Jul 23, 2022
·
1 revision
WorldIteratorAPI is an API for iterating through the game world. Useful, for example, for scanning the terrain.
The WorldIteratorAPI uses the coordinate system from ScalarContainers. That is, to get the coordinate of the point at the location, you will need to do something like DiscretePosition#getCoordinate(Axis.Y);. In short, ScalarContainers is a library for unified work with a multi-dimensional discrete space, for example 2D or 4D.
To iterate around the world, you can do this:
World world = Bukkit.getWorld("world");
new WorldIterator(
world,
world.getChunkAt(-100, -100),
world.getChunkAt(100, 100)
).iterator().forEachRemaining(chunk -> {
// doing something with every chunk
});-
Создание плагина
- Создание main-класса
- Настройка ancapplugin.yml
- Использование AncapPluginAPI
- Использование LanguageAPI
- Использование CommunicatorAPI
- Использование ConfigurationAPI
- Использование CommandAPI
- Использование DatabaseAPI
- Использование EventAPI
- Использование MaterialAPI
- Использование WorldIteratorAPI
- Использование BukkitUtil
- Использование ResourceAPI
-
- Creating main class
- Setting up the ancapplugin.yml
- Using the AncapPluginAPI
- Using the LanguageAPI
- Using the CommunicatorAPI
- Using the ConfigurationAPI
- Using the CommandAPI
- Using the DatabaseAPI
- Using the EventAPI
- Using the MaterialAPI
- Using the WorldIteratorAPI
- Using the BukkitUtil
- Using the ResouceAPI