Commit Graph

166 Commits

Author SHA1 Message Date
Bukkit/Spigot
dd8840cd02 SPIGOT-6918: Add SpawnCategory API and configurations for Axolotls
By: Doc <nachito94@msn.com>
2022-02-07 18:47:24 +11:00
Bukkit/Spigot
5dd0f2a5b6 #706: Add playSound with Entity as source
By: Gero <gecam59@gmail.com>
2022-01-11 18:53:34 +11:00
Bukkit/Spigot
8b6e67635a #662: Support for configuring Water Underground Creatures spawn settings
By: Doc <nachito94@msn.com>
2021-10-05 11:31:21 +11:00
Bukkit/Spigot
99ce197044 SPIGOT-6697: Deprecate generateTree with BlockChangeDelegate as it does not handle tiles
By: md_5 <git@md-5.net>
2021-08-22 18:12:37 +10:00
Bukkit/Spigot
c255eb3333 SPIGOT-5880, SPIGOT-5567: New ChunkGenerator API
## **Current API**
The current world generation API is very old and limited when you want to make more complex world generation. Resulting in some hard to fix bugs such as that you cannot modify blocks outside the chunk in the BlockPopulator (which should and was per the docs possible), or strange behavior such as SPIGOT-5880.

## **New API**
With the new API, the generation is more separate in multiple methods and is more in line with Vanilla chunk generation. The new API is designed to as future proof as possible. If for example a new generation step is added it can easily also be added as a step in API by simply creating the method for it. On the other side if a generation step gets removed, the method can easily be called after another, which is the case with surface and bedrock. The new API and changes are also fully backwards compatible with old chunk generators.

### **Changes in the new api**
**Extra generation steps:**
Noise, surface, bedrock and caves are added as steps. With those generation steps three extra methods for Vanilla generation are also added. Those new methods provide the ChunkData instead of returning one. The reason for this is, that the ChunkData is now backed by a ChunkAccess. With this, each step has the information of the step before and the Vanilla information (if chosen by setting a 'should' method to true). The old method is deprecated.

**New class BiomeProvider**
The BiomeProvider acts as Biome source and wrapper for the NMS class WorldChunkManager. With this the underlying Vanilla ChunkGeneration knows which Biome to use for the structure and decoration generation. (Fixes: SPIGOT-5880). Although the List of Biomes which is required in BiomeProvider, is currently not much in use in Vanilla, I decided to add it to future proof the API when it may be required in later versions of Minecraft.
The BiomeProvider is also separated from the ChunkGenerator for plugins which only want to change the biome map, such as single Biome worlds or if some biomes should be more present than others.

**Deprecated isParallelCapable**
Mojang has and is pushing to a more multi threaded chunk generation. This should also be the case for custom chunk generators. This is why the new API only supports multi threaded generation. This does not affect the old API, which is still checking this.

**Base height method added**
This method was added to also bring the Minecraft generator and Bukkit generator more in line. With this it is possible to return the max height of a location (before decorations). This is useful to let most structures know were to place them. This fixes SPIGOT-5567. (This fixes not all structures placement, desert pyramids for example are still way up at y-level 64, This however is more a vanilla bug and should be fixed at Mojangs end).

**WorldInfo Class**
The World object was swapped for a WorldInfo object. This is because many methods of the World object won't work during world generation and would mostly likely result in a deadlock. It contains any information a plugin should need to identify the world.

**BlockPopulator Changes**
Instead of directly manipulating a chunk, changes are now made to a new class LimitedRegion, this class provides methods to populated the chunk and its surrounding area. The wrapping is done so that the population can be moved into the place where Minecraft generates decorations. Where there is no chunk to access yet. By moving it into this place the generation is now async and the surrounding area of the chunk can also be used.

For common methods between the World and LimitedRegion a RegionAccessor was added.

By: DerFrZocker <derrieple@gmail.com>
2021-08-15 08:08:11 +10:00
Bukkit/Spigot
7f258ff344 Add dimension setting getters to World
By: Doc <nachito94@msn.com>
2021-08-11 18:57:21 +10:00
Bukkit/Spigot
fbf66f5957 SPIGOT-6302: Javadoc fix for World#spawnEntity()
Method does not return null

By: Mmaarten <mmaartendisc@gmail.com>
2021-04-20 18:47:00 +10:00
Bukkit/Spigot
3b841edc7c SPIGOT-5877: Add scaffolding for custom dimensions and biomes
By: Martoph <sager1018@gmail.com>
2021-04-11 17:54:45 +10:00
Bukkit/Spigot
b2935a657a SPIGOT-6357: Add World#getMinHeight
By: md_5 <git@md-5.net>
2021-03-28 19:31:39 +11:00
Bukkit/Spigot
d1017aa606 #591: Add option for a consumer before spawning an item
By: Martoph <sager1018@gmail.com>
2021-03-09 08:47:28 +11:00
Bukkit/Spigot
652b7b8ea8 SPIGOT-5778: Added World.getGameTime method
By: Jakub Zacek <dawon.cz@gmail.com>
2021-02-13 10:25:32 +11:00
Bukkit/Spigot
c88819ddd0 Fix javadoc in previous commit
By: md_5 <git@md-5.net>
2020-11-26 10:20:11 +11:00
Bukkit/Spigot
031310657d #561: Add clear weather World API
By: Parker Hawke <hawkeboyz2@hotmail.com>
2020-11-26 10:08:22 +11:00
Bukkit/Spigot
87927f4484 #543: Let World#setSpawnLocation() support an angle
By: Parker Hawke <hawkeboyz2@hotmail.com>
2020-08-18 17:54:34 +10:00
Bukkit/Spigot
4cf580fde0 Add configuration options for water_ambient spawning
By: md_5 <git@md-5.net>
2020-06-26 18:39:34 +10:00
Bukkit/Spigot
eed3a67ee8 Update to Minecraft 1.16.1
By: md_5 <git@md-5.net>
2020-06-25 10:00:00 +10:00
Bukkit/Spigot
48bc105f6f #482: Add a DragonBattle API to manipulate respawn phases etc
By: Parker Hawke <hawkeboyz2@hotmail.com>
2020-03-24 19:53:44 +11:00
Bukkit/Spigot
b35aa20f22 SPIGOT-5484: Add more spawn tick settings
By: Phoenix616 <mail@moep.tv>
2020-03-07 18:17:30 +01:00
Bukkit/Spigot
92cb9d0c47 #473: Add an API for passing the heightmap to getHighestBlockAt* method
By: ysl3000 <yannicklamprecht@live.de>
2020-02-09 10:31:05 +11:00
Bukkit/Spigot
902b81e2dd SPIGOT-5523: Clarify getHighestBlock docs with current behaviour
By: md_5 <git@md-5.net>
2020-01-22 08:58:47 +11:00
Bukkit/Spigot
281754ffbd SPIGOT-5496: API to create and manipulate hardcore worlds
By: md_5 <git@md-5.net>
2020-01-04 10:14:11 +11:00
Bukkit/Spigot
ff11da2791 SPIGOT-5422: Add support for 3-dimensional biomes
By: md_5 <git@md-5.net>
2019-12-11 15:26:24 +11:00
Bukkit/Spigot
fe63b8897f SPIGOT-5353: Expand explosion API by adding source entity
By: md_5 <git@md-5.net>
2019-10-05 17:16:41 +10:00
Bukkit/Spigot
71802c602b SPIGOT-5211: Add Raid API
By: anhcraft <admin@anhcraft.dev>
2019-08-12 18:09:35 +07:00
Bukkit/Spigot
7bfc0554c2 Add Plugin Chunk Ticket API
Allows plugins to force certain chunks to be kept loaded for as long as they are enabled.

By: Spottedleaf <Spottedleaf@users.noreply.github.com>
2019-07-08 12:14:29 +10:00
Bukkit/Spigot
b2c53e8c68 Fix some javadoc warnings
Also remove a couple old/broken deprecated methods

By: md_5 <git@md-5.net>
2019-05-20 20:29:33 +10:00
Bukkit/Spigot
7bcfc2f673 Regular arrow spawn method should not have changed type
By: md_5 <git@md-5.net>
2019-05-01 18:14:43 +10:00
Bukkit/Spigot
687e30abd0 World#spawnArrow should return an AbstractArrow now
By: md_5 <git@md-5.net>
2019-04-30 21:31:14 +10:00
Bukkit/Spigot
f897021458 Add important documentation to chunk load methods
By: md_5 <git@md-5.net>
2019-04-26 22:00:24 +10:00
Bukkit/Spigot
e9ae9842f0 Apply and enforce import ordering rules
By: md_5 <git@md-5.net>
2019-04-23 14:33:57 +10:00
Bukkit/Spigot
c240b58f66 Begin implementation of CheckStyle style checking
By: md_5 <git@md-5.net>
2019-04-23 14:00:20 +10:00
Bukkit/Spigot
30a442aef7 Update to Minecraft 1.14-pre5
By: md_5 <git@md-5.net>
2019-04-23 12:00:00 +10:00
Bukkit/Spigot
416c865476 SPIGOT-2540: Add nullability annotations to entire Bukkit API
By: Darkyenus <darkyenus@gmail.com>
2019-03-13 17:42:57 +11:00
Bukkit/Spigot
6a80664621 Fix variant of unloadChunkRequest that was incorrectly never deprecated
By: md_5 <git@md-5.net>
2019-01-14 21:01:38 +11:00
Bukkit/Spigot
45c470ee2a Further discourage World.regenerateChunk
By: md_5 <git@md-5.net>
2019-01-03 15:45:16 +11:00
Bukkit/Spigot
022955b377 SPIGOT-3747: Add API for force loaded chunks
By: md_5 <git@md-5.net>
2018-12-27 12:44:43 +11:00
Bukkit/Spigot
cf8cbb0713 Tweak Block.getTemperature to return actual block temperature
By: md_5 <git@md-5.net>
2018-12-19 10:53:02 +11:00
Bukkit/Spigot
55523cfcfc Add ray tracing and bounding box API
By: blablubbabc <lukas@wirsindwir.de>
2018-10-26 19:59:36 +11:00
Bukkit/Spigot
260ae5cb5c SPIGOT-4397: isChunkGenerated API
By: md_5 <git@md-5.net>
2018-09-26 17:19:10 +10:00
Bukkit/Spigot
663aa772f0 Update documentation of structure locate API to reflect implementation behaviour
By: Senmori <thesenmori@gmail.com>
2018-09-24 19:19:21 +10:00
Bukkit/Spigot
f2aaef5c07 Add API to locate structures
By: Senmori <thesenmori@gmail.com>
2018-09-21 08:49:55 -04:00
Bukkit/Spigot
8a47bcf97a SPIGOT-4309: Add "forced" display of particles
By: md_5 <git@md-5.net>
2018-08-26 18:25:47 +10:00
Bukkit/Spigot
823697c6e3 Expand GameRule API
By: Senmori <thesenmori@gmail.com>
2018-08-11 11:24:16 +10:00
Bukkit/Spigot
1a6f5b7b2c Deprecate and add note to regenerateChunk method
By: md_5 <git@md-5.net>
2018-08-07 13:14:06 +10:00
Bukkit/Spigot
767e4f6ccf Update to Minecraft 1.13-pre7
By: md_5 <git@md-5.net>
2018-07-15 10:00:00 +10:00
Bukkit/Spigot
987a10e861 Deprecate BlockChangeDelegate
By: md_5 <git@md-5.net>
2017-12-03 14:15:39 +11:00
Bukkit/Spigot
965095c0b9 Add setSpawnLocation(Location)
By: Cory Redmond <ace@ac3-servers.eu>
2016-07-11 02:07:58 +01:00
Bukkit/Spigot
eae60ccc96 Implement pre-spawn API to allow modifications to spawned entities.
See preceding commit for why this change was included.

By: Xor Boole <mcyoung@mit.edu>
2016-12-06 21:38:05 +11:00
Bukkit/Spigot
389da4ad7b Added method for spawning a falling block with the BlockData
By: LukBukkit <luk.bukkit@gmail.com>
2016-11-26 19:23:20 +01:00
Bukkit/Spigot
1396386f23 Implement SoundCategory for playing sounds.
By: LukBukkit <luk.bukkit@gmail.com>
2016-11-19 14:19:53 +11:00