173 Commits

Author SHA1 Message Date
Doc
4230f8f0e4
SPIGOT-7083: Add Boat.WoodenType, Boat.Status; deprecate TreeSpecies 2022-07-05 20:40:35 +10:00
Doc
991aeda121
SPIGOT-1729, SPIGOT-7090: Keep precision in teleportation between worlds 2022-07-02 12:26:55 +10:00
Doc
82f757467a
SPIGOT-7078: Add EntityPotionEffectEvent.Cause#WARDEN 2022-06-23 20:34:34 +10:00
DerFrZocker
6866aab59a
SPIGOT-2420: Can't set exp drops for EnderDragon death 2022-06-18 20:59:19 +10:00
Doc
3571ca8d13
#1070: Add SpawnReason and TransformReason for Tadpole metamorphosis into Frog 2022-06-13 15:24:58 +10:00
md_5
64c15270e7
Update to Minecraft 1.19 2022-06-08 02:00:00 +10:00
Doc
a59dc59e88
SPIGOT-7025: Use existing item in hand for ranged Drowned attack 2022-06-05 16:30:03 +10:00
DerFrZocker
9d46b56e26
SPIGOT-7009: Stuck on "Loading terrain..." after disconnecting on respawn screen 2022-06-03 09:19:53 +10:00
DerFrZocker
7bc728a6b8
#1045: Revert changes to persistence required checks 2022-05-03 23:13:03 +10:00
Doc
e87f2e3ed1
SPIGOT-6992: Add LimitedLife/LifeTicks/Bound APIs to Vex 2022-04-21 06:45:42 +10:00
md_5
cf391b51c8
Pass in SpawnReason rather than boolean 2022-04-18 11:05:15 +10:00
Doc
098aecb04f
SPIGOT-7001: Fix entity already exists in CraftWorld#spawnFallingBlock 2022-04-18 11:05:12 +10:00
Doc
a459f4d4f5
#1033: Add Villager#zombify 2022-04-15 13:48:55 +10:00
DerFrZocker
34d40b0eb7
SPIGOT-2942: give command fires PlayerDropItemEvent, cancelling it causes Item Duplication 2022-03-11 21:47:13 +01:00
BlackHole
74c0831230
SPIGOT-6962: Call EntityChangeBlockEvent when when FallingBlockEntity starts to fall 2022-03-11 16:24:02 +11:00
md_5
05a38da190
Update to Minecraft 1.18.2 2022-03-01 02:00:00 +11:00
md_5
38f204d8cb
SPIGOT-6936: Cancelling EntityAirChangeEvent doesn't stop player's bubbles from decreasing client side 2022-02-20 09:25:32 +11:00
md_5
3aabea17fe
SPIGOT-6937: Ramming goat does not throw EntityTargetLivingEntityEvent 2022-02-20 09:07:37 +11:00
DerFrZocker
bdac46b07b
SPIGOT-6782: EntityPortalEvent should not destroy entity when setTo() uses same world as getFrom() 2022-02-05 18:51:46 +01:00
DerFrZocker
30b4043e2a
SPIGOT-6907: Oxygen does not restore up to value set by LivingEntity#setMaximumAir() 2022-01-23 09:06:19 +11:00
Phoenix616
74a5cc8a78
#994: Fix changing world in portal events not updating used world border
Also clamp the event's target location to the world border
2022-01-20 18:36:14 +11:00
Doc
2e61a5f8eb
SPIGOT-6888: Add SpawnReason for Vex spawned by Evokers 2022-01-14 10:55:59 +11:00
DerFrZocker
cc86ab1886
SPIGOT-5339, SPIGOT-6252, SPIGOT-6777: Only cancel knockback if the damage event was canceled 2022-01-03 18:07:01 +01:00
md_5
fb92f345d9
SPIGOT-6278: Persistent piglins count towards mob cap 2022-01-02 11:45:52 +11:00
Matthew
752fa511a9
#374: Add isJohnny / setJohnny for Vindicator 2022-01-01 09:58:04 +11:00
Matthew
19f2af066e
#373: Add trap related methods to SkeletonHorse 2022-01-01 09:58:04 +11:00
blablubbabc
0ba6b90135
SPIGOT-5766: The VillagerReplenishTradeEvent is now called when a villager restocks its trades. 2021-12-25 10:14:17 +11:00
DerFrZocker
bdff7d56fb
SPIGOT-5627: Leads vanish when transporting leashed entities through a Nether portal 2021-12-25 09:39:27 +11:00
md_5
3c2af1b7f5
SPIGOT-6831: Fix llama strength crash 2021-12-06 15:15:09 +11:00
Rafael S. M. Santos
fd3478bc77
#967: Store last lava contact location for events 2021-12-04 08:06:32 +11:00
md_5
6f3509d12e
Release POIs when villagers are removed by plugins 2021-12-03 15:05:20 +11:00
md_5
2ccb6a9b9f
SPIGOT-6828: <player> fell off a ladder/vines death message not supported 2021-12-02 12:29:35 +11:00
Doc
a46e7f18e8
SPIGOT-6820: VillagerCareerChangeEvent's ChangeReason is sometimes incorrect 2021-12-01 08:26:14 +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
a7b8b0270a
Update to Minecraft 1.18-pre5 2021-11-22 09:00:00 +11:00
md_5
eb14700779
SPIGOT-6797: EntityInteractEvent called with incorrect location 2021-11-21 11:23:17 +11:00
md_5
f63504952f
SPIGOT-6798: EntityChangeBlockEvent called with incorrect location 2021-11-21 11:18:06 +11:00
Doc
9217b523e5
#929: Call EntityBlockFormEvent for Wither Rose placed by dead entity 2021-09-06 18:57:16 +10:00
Phoenix616
6719d1f1e7
SPIGOT-6708: Fix Experience Orb value not being updated in mend event 2021-09-03 18:37:44 +10:00
md_5
c949675e1f
SPIGOT-6713: Cancelling EntityTransformEvent Causes Deceased Slimes To Not Despawn 2021-08-22 18:07:31 +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
md_5
8dfa97afe4
SPIGOT-6669: Shearing a Mooshroom does not fire EntityDropItemEvent 2021-07-23 16:36:16 +10:00
md_5
0abf420c4b
SPIGOT-6665: Shearing a Snowman does not drop a carved pumpkin 2021-07-22 17:51:53 +10:00
md_5
9e06bb2a26
SPIGOT-6663: Chicken Jockeys chickens don't despawn 2021-07-22 09:53:26 +10:00
DerFrZocker
699f2d36b0
SPIGOT-6545: Unable to set Guardian target via API while awareness is disabled 2021-07-22 09:36:54 +10:00
Doc
9add952b76
SPIGOT-6623: Missing API reasons for entity freezing 2021-07-11 09:32:27 +10:00
md_5
fb556bfa14
Update to Minecraft 1.17.1 2021-07-07 00:00:00 +10:00
md_5
cbe0ac7ce1
SPIGOT-6616: Cancellable StriderTemperatureChangeEvent 2021-07-03 09:36:51 +10:00
Ibrahim Ansari
9ba1c67efc
#870: Add isTrusting/setTrusting to CraftOcelot. 2021-06-21 08:43:09 +10:00