409 Commits

Author SHA1 Message Date
md_5
0cd47ae827
Remove changes to string API contracts introduced by prior commits 2023-06-12 20:39:58 +10:00
md_5
461cd81328
Fix another issue from previous commit 2023-06-12 20:35:38 +10:00
Doc
40945171bf
#1182: Consolidate Preconditions use and minor cleanup 2023-06-12 19:41:02 +10:00
Hannah
e472b6c172
#1184: Add setMotd and setMaxPlayers 2023-06-11 10:51:11 +10:00
md_5
e1188ed3a2
Update to Minecraft 1.20 2023-06-08 01:30:00 +10:00
Doc
dbc70bed55
SPIGOT-7195, SPIGOT-7197: Add DataPack API 2023-05-30 19:05:48 +10:00
md_5
d9324b4bc7
Fix addition of custom smithing trim / transform recipes 2023-05-14 12:11:23 +10:00
Doc
f92a41c396
#1181: Consolidate Location conversion code 2023-04-19 19:59:19 +10:00
md_5
bcedf28a1b
Update to Minecraft 1.19.4 2023-03-15 03:30:00 +11:00
md_5
2ed3e3e6e5
SPIGOT-7210: Fix structures in custom worlds 2022-12-16 11:13:10 +11:00
md_5
585ab5ba1b
SPIGOT-7207: WorldCreator creates world as super flat even when normal is specified 2022-12-14 13:47:32 +11:00
md_5
eecb4c0dc0
SPIGOT-7196: Exception loading alternate worlds 2022-12-08 18:02:21 +11:00
md_5
19e6be0209
Update to Minecraft 1.19.3 2022-12-08 03:00:00 +11:00
md_5
d45057c597
SPIGOT-7089: Crash when command blocks attempt to load worlds 2022-08-14 10:46:41 +10:00
Parker Hawke
c379a6b4e4
SPIGOT-2450: Improve scoreboard criteria API, add missing DisplaySlots 2022-08-08 21:50:13 +10:00
DerFrZocker
68f888ded3
SPIGOT-7011, SPIGOT-7065: Overhaul of structures 2022-07-01 20:41:04 +10:00
DerFrZocker
6c61b73f38
#1052: Add option to use cached map color palette
This reduces the conversion time drastically with the cost of slightly more memory usage.
2022-06-18 21:13:42 +10:00
Doc
36c2681af9
#1066: Add missing server properties methods from 1.19 2022-06-18 20:49:03 +10:00
md_5
64c15270e7
Update to Minecraft 1.19 2022-06-08 02:00:00 +10:00
Parker Hawke
6c308e1b57
SPIGOT-6829: Add per-player world border API 2022-04-09 09:39:33 +10:00
Doc
808cb7ca5c
#1023: Improve consistency of tag API 2022-03-06 16:24:58 +11:00
md_5
21fe78aa4f
SPIGOT-6957: Bad default value for WorldCreator#generatorSettings 2022-03-04 08:15:31 +11:00
md_5
05a38da190
Update to Minecraft 1.18.2 2022-03-01 02:00:00 +11:00
Doc
febaa1c6f5
SPIGOT-6918: Add SpawnCategory API and configurations for Axolotls 2022-02-07 18:52:16 +11:00
blablubbabc
8f361ecec0
#1002: Add Player Profile API
Slight changes may occur as this API is stabilized.

This PR is based on work previously done by DerFrZocker in #938.
2022-02-03 09:25:39 +11:00
Patrick Choe
439c685f4e
SPIGOT-6789: Improve resource pack related API 2021-12-18 11:46:17 +11:00
md_5
dad8517102
SPIGOT-6851: removeRecipe not unregistering recipe ID 2021-12-13 11:25:22 +11:00
md_5
03b7252338
SPIGOT-6823: Fix loading custom world in combination with superflat 2021-12-03 08:34:38 +11:00
Doc
4bf7f33cc6
#956: Add getHideOnlinePlayers 2021-11-23 12:49:03 +11:00
md_5
a7b8b0270a
Update to Minecraft 1.18-pre5 2021-11-22 09:00:00 +11:00
Sander Knauff
1df303e707
SPIGOT-2903: Add Structure API 2021-10-05 12:24:21 +11:00
Doc
346ebb7a7a
#934: Support for configuring Water Underground Creatures spawn settings 2021-10-05 11:39:21 +11:00
md_5
d3cc412075
SPIGOT-6738: Add entity type tags 2021-09-19 14:51:21 +10:00
md_5
332335e1c6
SPIGOT-6731: "Nag author" message in CraftServer lists one author only 2021-09-10 17:49:53 +10:00
DerFrZocker
09b99daf30
SPIGOT-6722: Close entity manager when unloading world 2021-08-27 19:14:09 +10:00
DerFrZocker
4f6bcc84f9
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.
2021-08-15 08:08:16 +10:00
James Peters
e8e3cbccf5
#893: Add Crafting methods to API 2021-07-22 11:37:22 +10:00
md_5
fb556bfa14
Update to Minecraft 1.17.1 2021-07-07 00:00:00 +10:00
md_5
b121d3b953
SPIGOT-6605: Add method to access value of enforce-whitelist 2021-06-26 09:58:34 +10:00
md_5
f81f49940f
SPIGOT-6594: NPE at Bukkit.getServer().getGenerateStructures() 2021-06-24 08:37:58 +10:00
md_5
1c39efa340
Fix Inventory#getViewers on the player inventory not returning the player first time their inventory is opened 2021-06-20 09:27:32 +10:00
md_5
f992ce6097
Fix duplicate datapack reload on /reload 2021-06-15 15:51:13 +10:00
md_5
40caacc846
SPIGOT-6526: World entities are not populated when plugin onEnable is called 2021-06-13 15:05:32 +10:00
DerFrZocker
4db9c49f97
SPIGOT-6510: Bukkit#createMap throws NullPointerException 2021-06-12 08:25:44 +10:00
md_5
e2f5ea34e9
Update to Minecraft 1.17 2021-06-11 15:00:00 +10:00
DerFrZocker
cc21bae977
SPIGOT-5569: Call WorldInitEvent before any chunks are getting generated 2021-05-18 08:18:20 +10:00
Kermina Awad
51e2981b5b
#831: Reload unloaded main worlds correctly 2021-05-12 17:20:27 +10:00
md_5
90d6905b15
Repackage NMS 2021-03-16 09:00:00 +11:00
md_5
aeb95e3a30
Add more checkstyle checks 2021-01-31 10:08:41 +11:00
pop4959
768d7fc2df
#773: Add method to get max world size 2020-12-13 11:30:54 +11:00