Commit Graph

783 Commits

Author SHA1 Message Date
Pedro d637ae85dd Fix NoSuchElementException in EntityTransformEvent for slimes (#12510) 2025-05-02 21:15:58 +02:00
Lulu13022002 bc3d946fdf Normalizes CraftEntity#toString/getHandle (#12170) 2025-04-30 21:21:04 -04:00
Lulu13022002 567f63ae34 Parity for respawn events (#11792) 2025-04-30 20:04:24 +02:00
Oleksandr Semenishchev 1db3785307 [ci skip] improve javadoc for off-hand swaps through getHotbarButton (#12489) 2025-04-28 17:22:05 +02:00
wizjany 55f2020926 Fix CCE in LingeringPotionSplashEvent (#12463) 2025-04-22 21:08:29 +01:00
David 6b4ad08259 Add PlayerRespawnEvent#isMissingRespawnBlock (#12422) 2025-04-14 19:43:19 +02:00
masmc05 4511edb849 [ci skip] Don't promote checking enchantment by legacy lore (#12421) 2025-04-13 11:28:03 +02:00
Nassim Jahnke f00727c57e 1.21.5
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
Co-authored-by: MiniDigger | Martin <admin@minidigger.dev>
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
Co-authored-by: Noah van der Aa <ndvdaa@gmail.com>
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com>
Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
2025-04-12 17:27:00 +02:00
Nassim Jahnke bb3b7e6979 Fix annotation mistakes 2025-03-23 22:33:28 +01:00
Nassim Jahnke 9f00461456 Update a whole lot of deprecated annotations 2025-03-21 17:50:04 +01:00
Github-Citizen f4f275519f [ci skip] Clarify BlockFadeEvent#getNewState javadocs (#12250) 2025-03-09 21:58:56 +01:00
Vincenzo Reina 5538d24d72 Fix "DEFAULT" SpawnReason of fish spawned by bucket (#12227)
* Add SpawnReason "Bucket". Fix "DEFAULT" SpawnReason for entity spawning from mob bucket

* Clarify SpawnReason description for bucket entity spawning
2025-03-05 13:28:25 +01:00
Lulu13022002 7bee99714a Cleanup damage source a bit (#12106) 2025-02-16 20:14:00 +01:00
caramel 7e21cb8181 fix PlayerChangedMainHandEvent javadoc (#12020)
* fix PlayerChangedMainHandEvent javadoc

* Obsolete

---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2025-01-26 14:00:32 -08:00
Bjarne Koll 1bb3677651 Remove deprecation from EntityRemoveEvent (#11961)
Bukkits entity remove event is called at a different time than the
existing paper event, specifically it is called after an entity has been
stored during chunk unloads.

This means that, while the bukkit event can have a defined reason, it
does not allow modification to the entity data. In this regard it
differs from the paper implementation and prevents developers from using
the paper event as an alternative.

Co-authored-by: TonytheMacaroni <tonythemacaroni123@gmail.com>
2025-01-13 17:51:58 +01:00
Tamion 19ddbeff9e Fix InventoryAction wrong for Bundles (#11902) 2025-01-11 19:50:24 +01:00
Jake Potrebic ca8709b30f Fix more incorrect array nullability annotations (#11836) 2024-12-27 22:24:16 +01:00
Maddy Miller d85d318951 Fix NullPointerException in PlayerInteractEvent#getClickedPosition (#11827)
Fixes a NullPointerException in PlayerInteractEvent#getClickedPosition

Re: https://github.com/EngineHub/CraftBook/issues/1340
2024-12-26 08:41:37 +00:00
Jake Potrebic 083c083188 Fix a bunch more issues arising from mutable types (#11769) 2024-12-22 22:50:00 +01:00
Lulu13022002 5922e6334b fix allowPermanentBlockBreakExploits config 2024-12-18 23:35:47 +01:00
Bjarne Koll a47a008ce1 Fix incorrect invulnerability damage reduction
Fixes incorrect spigot handling of the invulnerability damage
reduction applied when an already invulnerable entity is damaged with a
larger damage amount than the initial damage.
Vanilla still damages entities even if invulnerable if the damage to be
applied is larger than the previous damage taken. In that case, vanilla
applies the difference between the previous damage taken and the
proposed damage.

Spigot's damage modifier API takes over the computation of damage
reducing effects, however spigot invokes this handling with the initial
damage before computing the difference to the previous damage amount.
This leads to the reduction values to generally be larger than expected,
as they are computed on the not-yet-reduced value.
Spigot applies these reductions after calling the EntityDamageEvent and
*then* subtracts the previous damage point, leading to the final damage
amount being smaller than expected.

This patch cannot simply call the EntityDamageEvent with the reduced
damage, as that would lead to EntityDamageEvent#getDamage() returning
the already reduced damage, which breaks its method contract.
Instead, this patch makes use of the DamageModifier API, implementing
the last-damage-reduction as a DamageModifier.
2024-11-11 21:35:22 +01:00
Tamion 7b11ab058b Add recipeBrewTime 2024-09-20 17:39:22 +02:00
Jake Potrebic ada45eba8a Deprecate InvAction#HOTBAR_MOVE_AND_READD 2024-05-25 09:51:07 -07:00
SoSeDiK 4491c7e2ac Add missing fishing event state 2024-05-01 07:44:50 +03:00
Owen1212055 69edd6d91f Brigadier based command API
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2022-08-01 22:50:29 -04:00
Owen1212055 53c5e5da09 Item Mutation Fixes 2024-03-20 20:42:31 -04:00
Jake Potrebic 96f6033450 Clone mutables to prevent unexpected issues
There are lots of locations in the API where mutable
types are not cloned, either on return or when passed
as a parameter and assigned to a field, which can cause
unexpected behaviors. Let this be a lesson to use
immutable types for simple things Location, Vector, and
others.
2024-03-16 11:10:48 -07:00
Jake Potrebic e18f6c6b55 Fix DamageSource API 2024-03-16 11:21:14 -07:00
Jake Potrebic 27a62b6b53 Add drops to shear events 2021-05-18 12:31:54 -07:00
Jake Potrebic a933298032 Add missing InventoryType
Upstream did not add a DECORATED_POT inventory type
2023-12-27 16:46:13 -08:00
Jake Potrebic 1ab1d0f10a Experimental annotations change 2023-12-09 11:47:53 -08:00
Tamion 450a42a3fe Expand LingeringPotion API 2023-11-04 23:56:23 +01:00
booky10 4e6ceb54bb Add hand to fish event for all player interactions 2023-07-03 01:55:32 +02:00
Tamion 3c50e35f30 Fix PlayerSwapHandItemsEvent throwing exception when mainhand or offhand set to null 2023-09-25 19:55:51 +02:00
Jake Potrebic 1c0b535949 Add titleOverride to InventoryOpenEvent 2022-03-04 12:45:21 -08:00
Warrior 4b46a36a94 Limit setBurnTime to valid short values 2023-08-18 08:07:38 +02:00
The456gamer 9e3e11d2f2 Expose hand during BlockCanBuildEvent 2023-08-21 14:13:43 +01:00
aerulion 3008a27f33 Expose clicked BlockFace during BlockDamageEvent 2023-08-21 04:36:07 +02:00
by77er 7c2fbd4ab8 Add event for player editing sign 2023-06-10 19:06:24 -04:00
Jake Potrebic 6c1411fec8 Expand PlayerItemMendEvent 2022-01-20 18:11:44 -08:00
Jake Potrebic 216d310a35 Fix HandlerList for InventoryBlockStartEvent subclasses 2023-02-07 08:20:27 -08:00
Jake Potrebic 40c7b09ed4 Improve PortalEvents 2022-12-15 10:33:34 -08:00
Warrior 8636a7d5a4 Add /paper dumplisteners command 2022-11-19 19:46:44 +01:00
Owen1212055 4eafd09fd9 More Teleport API 2021-09-05 00:36:05 -04:00
Jake Potrebic 495ba77d85 Add EntityDyeEvent and CollarColorable interface 2022-03-18 21:16:38 -07:00
HexedHero 6ede3992b9 Add pre-unbreaking amount to PlayerItemDamageEvent 2022-04-10 06:21:19 +01:00
Jake Potrebic 7fae67e6b3 Fix incorrect new blockstate in EntityBreakDoorEvent 2023-07-02 22:14:09 -07:00
Kieran Wallbanks 5468da1b03 Fix NotePlayEvent 2021-06-21 12:33:45 +01:00
Jake Potrebic 546372966a Extend VehicleCollisionEvent, move HandlerList up
Co-authored-by: SoSeDiK <mrsosedik@gmail.com>
2021-12-13 14:35:27 -08:00
dodison 4bfca492a5 Add critical damage API 2021-07-26 17:35:20 +02:00