54 Commits

Author SHA1 Message Date
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
19e6be0209
Update to Minecraft 1.19.3 2022-12-08 03:00:00 +11:00
Doc
300e7448f5
SPIGOT-7179: PortalCreateEvent doesn't fire for players 2022-11-06 18:14:38 +11:00
md_5
6da82662bb
Update to Minecraft 1.19.1 2022-07-28 04:00:00 +10:00
Doc
ef09464094
#1091: Fix exit position in entity travel with portals 2022-07-25 18:00:57 +10:00
Doc
c882f38ea9
SPIGOT-7066: Fix custom END worlds not generating DragonBattle 2022-06-18 21:06:59 +10:00
DerFrZocker
cc7edd6bc5
SPIGOT-7051: Worldgen API does not run vanilla noise generation when shouldGenerateNoise is true 2022-06-10 19:08:36 +10:00
md_5
b2557f6acd
SPIGOT-7041: Custom BiomeProvider not used when world set to type FLAT 2022-06-10 11:08:00 +10:00
md_5
6209029ea8
SPIGOT-7048: addPassenger() not working when vehicle is player 2022-06-10 10:39:19 +10:00
md_5
64c15270e7
Update to Minecraft 1.19 2022-06-08 02:00:00 +10:00
DerFrZocker
518f1beed0
SPIGOT-6948: Motion from Explosion after Respawn 2022-05-17 19:22:58 +10:00
Parker Hawke
6c308e1b57
SPIGOT-6829: Add per-player world border API 2022-04-09 09:39:33 +10:00
blablubbabc
a567e4ae63
#1038: Removed the no longer needed getChunkUnchecked method from ChunkProviderServer.
This method was added in 8c7d69fefca16aaaac0465dce30899bc74944838 to fix SPIGOT-5228. But since Minecraft 1.17 changed how entities are added and removed from chunks, this method has no longer been used.
2022-03-27 16:24:09 +11:00
blablubbabc
4ac8fcce8d
SPIGOT-6980: Since 1.18.2, World#isChunkLoaded returned false for chunks that have just been loaded (e.g. inside ChunkLoadEvent).
Some changes of the 1.18.2 update have been reverted to resolve this regression.
2022-03-27 16:24:06 +11:00
DerFrZocker
953d3ddc67
SPIGOT-3034: PlayerKickEvent.setLeaveMessage(String) doesn't actually do anything 2022-03-16 19:49:07 +11:00
DerFrZocker
9ed7e4fbe4
SPIGOT-6138, SPIGOT-6415: Don't call CreatureSpawnEvent after cross-dimensional travel 2022-03-13 07:48:22 +11:00
md_5
05a38da190
Update to Minecraft 1.18.2 2022-03-01 02:00:00 +11:00
md_5
af4d848ffd
SPIGOT-6934: Bring plugin chunk tickets back in line with forceload tickets 2022-02-20 08:55:27 +11:00
DerFrZocker
cc5ddd7936
#1010: Add PDC to World 2022-02-15 09:36:00 +11:00
Doc
febaa1c6f5
SPIGOT-6918: Add SpawnCategory API and configurations for Axolotls 2022-02-07 18:52:16 +11:00
md_5
a672a53151
Clean up callBlockDamageEvent 2022-02-02 08:56:24 +11:00
FreeSoccerHDX
8e1bdeef50
SPIGOT-6910: Add BlockDamageAbortEvent 2022-02-02 08:56:23 +11:00
md_5
c2e0bbda4e
Update to Minecraft 1.18.1 2021-12-11 00:12:31 +11:00
md_5
1825cc0b04
Purge hidden entities on unload too 2021-12-04 08:23:26 +11:00
md_5
748ea518b1
SPIGOT-6833: Do not drop items into unrestricted world during world generation 2021-12-04 07:19:56 +11:00
md_5
37fd1917e7
Add hideEntity / showEntity API 2021-11-29 09:18:52 +11:00
md_5
c98abfb0ff
Update to Minecraft 1.18-rc3 2021-11-27 08:00:00 +11:00
md_5
5a39a236c1
Update to Minecraft 1.18-pre8 2021-11-25 08:00:00 +11:00
md_5
2f6662d467
Improve multi-dimension code 2021-11-23 18:39:43 +11:00
md_5
6ac2e0325a
SPIGOT-6802: Fix major issues with --forceUpgrade
More to come
2021-11-23 17:13:52 +11:00
md_5
a7b8b0270a
Update to Minecraft 1.18-pre5 2021-11-22 09:00:00 +11:00
md_5
422cec08d1
Rebuild patch 2021-09-01 19:02:09 +10:00
Doc
5be41fb80f
SPIGOT-6720: Fix bed explosion checks 2021-08-27 19:18:05 +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
DerFrZocker
97a4f34a8d
SPIGOT-2222, SPIGOT-6687: Pre-set keepLevel and only use it 2021-08-11 18:49:49 +10:00
DerFrZocker
e1c96e507f
SPIGOT-6682: Blocking with shield not reset after die 2021-08-04 17:09:09 +10:00
DerFrZocker
f7f8dce41f
SPIGOT-6552: Some inventory types reset cursor on switch 2021-07-30 19:08:43 +10:00
DerFrZocker
be8d625e3e
SPIGOT-5560, SPIGOT-6574, SPIGOT-6632: Remove no longer needed tile entity fix 2021-07-11 09:05:59 +10:00
md_5
fb556bfa14
Update to Minecraft 1.17.1 2021-07-07 00:00:00 +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
40caacc846
SPIGOT-6526: World entities are not populated when plugin onEnable is called 2021-06-13 15:05:32 +10:00
Parker Hawke
8bd43be507
SPIGOT-6535: PlayerGameModeChangeEvent event incorrectly reports old gamemode 2021-06-13 08:43:21 +10:00
md_5
cbf2f67802
SPIGOT-6508: Rename conflicted getServer 2021-06-11 21:40:36 +10:00
md_5
e2f5ea34e9
Update to Minecraft 1.17 2021-06-11 15:00:00 +10:00
Kermina Awad
d189f78bd9
#827: Trigger vanilla dimension advancements in non-main worlds 2021-05-15 10:06:28 +10:00
DerFrZocker
e1a6197ecb
SPIGOT-5565: Animals still spawn from chunk gen when spawn-animals=false 2021-05-11 08:18:34 +10:00
Julian van den Berkmortel
b6fdc7adb2
SPIGOT-6200: Improve entity events when summon command is used
* Calls the LightningStrikeEvent for summoned lightning
* Uses the new COMMAND SpawnReason for other entities
2021-05-09 16:33:34 +10:00
Julian van den Berkmortel
0d86921e12
SPIGOT-6435: send correcting "PacketPlayOutBlockChange" packet on interact for bisected items 2021-04-27 11:37:52 +10:00