47 Commits

Author SHA1 Message Date
md_5
bed1e3ff68
SPIGOT-7827: Sync EntityPortalEvent with PlayerPortalEvent since non-players can now create portals 2024-07-10 19:43:43 +10:00
md_5
a4c2ee70db
Update to Minecraft 1.21 2024-06-14 01:05:00 +10:00
Doc
741b844806
#1390: Improve internal handling of damage sources 2024-05-04 08:15:51 +10:00
md_5
735b2d0d7f
Update to Minecraft 1.20.5 2024-04-24 01:15:00 +10:00
DerFrZocker
a2736ddb06
SPIGOT-336, SPIGOT-3366, SPIGOT-5768, SPIGOT-6409, SPIGOT-6861, #1008: Add EntityRemoveEvent 2024-02-21 20:55:34 +11:00
Doc
80f0ce4be6
SPIGOT-7300, #1180: Add new DamageSource API providing enhanced information about entity damage 2024-02-11 09:54:25 +11:00
md_5
76931e8bd4
Add EntityMountEvent and EntityDismount Event
Adapted from Spigot commit ab1e1a2a5ae1e6cc42afe8bf48832721407365fd.
2024-01-07 08:59:55 +11:00
md_5
07e5dd5d59
Update to Minecraft 1.20.3 2023-12-06 03:40:00 +11:00
DerFrZocker
e54f39adca
SPIGOT-7487: entity.remove() on a leash drops a lead item 2023-12-01 08:01:44 +11:00
Jishuna
0478e0417b
#1266: Add support for virtual entities 2023-11-19 19:03:35 +13:00
Miles Holder
2c1b5f78fc
SPIGOT-7514, #1289: Add "Enchantment Roll" API to enchant items according to Minecraft mechanics 2023-11-09 06:30:23 +11:00
md_5
6d4b25bf19
Increase diff stability 2023-09-22 02:57:13 +10:00
md_5
28c1023286
Update to Minecraft 1.20.2 2023-09-22 02:40:00 +10:00
Owen1212055
95c335c636
#1226: Fix VehicleEnterEvent not being called for certain entities 2023-07-04 06:54:09 +10:00
Owen1212055
c1279f7751
#1209: Clean up various patches 2023-06-24 17:15:05 +10:00
md_5
9c5d600d13
Update to Minecraft 1.20.1 2023-06-13 07:00:00 +10:00
md_5
8c5311c200
SPIGOT-7382: Player still on fire after respawn 2023-06-11 17:30:03 +10:00
md_5
e1188ed3a2
Update to Minecraft 1.20 2023-06-08 01:30:00 +10:00
Doc
f92a41c396
#1181: Consolidate Location conversion code 2023-04-19 19:59:19 +10:00
Doc
2d5209e8d9
#1153: Handle teleport reason in spreadplayers command 2023-03-23 20:52:34 +11:00
md_5
bcedf28a1b
Update to Minecraft 1.19.4 2023-03-15 03:30:00 +11:00
md_5
e8010dc93f
#1136: Add API to allow entities to be invisible by default
Designed to make creating per-player entities easier
2023-03-04 09:15:52 +11:00
md_5
19e6be0209
Update to Minecraft 1.19.3 2022-12-08 03:00:00 +11:00
Parker Hawke
e5d6a9bbfc
#1100: Add methods to get sounds from entities 2022-09-11 22:24:15 +10: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
991aeda121
SPIGOT-1729, SPIGOT-7090: Keep precision in teleportation between worlds 2022-07-02 12:26:55 +10:00
md_5
64c15270e7
Update to Minecraft 1.19 2022-06-08 02:00:00 +10:00
DerFrZocker
7bc728a6b8
#1045: Revert changes to persistence required checks 2022-05-03 23:13:03 +10: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
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
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
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
2ccb6a9b9f
SPIGOT-6828: <player> fell off a ladder/vines death message not supported 2021-12-02 12:29:35 +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
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
9e06bb2a26
SPIGOT-6663: Chicken Jockeys chickens don't despawn 2021-07-22 09:53:26 +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
md_5
90d6905b15
Repackage NMS 2021-03-16 09:00:00 +11:00
md_5
69cf961d83
Repackage patches 2021-03-16 09:00:00 +11:00