13
0
geforkt von Mirrors/Paper
Commit graph

8186 Commits

Autor SHA1 Nachricht Datum
Jake Potrebic
72f5e76f9b Fix spawners checking max nearby entities with correct type (#8945)
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2023-11-18 15:59:12 -08:00
Bjarne Koll
8b711f86a3 Call LivingEntity#onItemPickup before mutation (#9948)
The existing EntityPickupItemEvent fixes patch moves the call to LivingEntity#onItemPickup for piglins after the respective EntityPickupItemEvent calls, which is correct.
However the patch moved the call so far down the line that the existing logic already mutated the picked up item entity, leading to faulty state being passed to the onItemPickup method.

To prevent logic in LivingEntity#onItemPickup to read from an ItemEntity that was already mutated, this commit moves the calls prior to the two respective mutations (either gold_nugget or rest).

This was chosen above taking a copy of the original item and restoring state later on to avoid a full item stack clone.
2023-11-17 07:43:25 +01:00
SoSeDiK
95c2b76467 Correct typo in javadoc (#9944) 2023-11-13 20:25:46 +02:00
Jake Potrebic
bbd013be54 Run the chat callback on the main thread as expected (#9935) 2023-11-11 15:33:19 -08:00
Jake Potrebic
776cc1199a Fix several issues with EntityBreedEvent (#8677)
Upstream did not account for different hands when storing
the breed item for later use in the event. Also they only
stored a reference to the stack, not a copy so if the stack
changed after love mode was started, the breed item in the event
also changed. Also in several places, the breed item was stored after
it was decreased by one to consume the item.
2023-11-11 15:23:02 -08:00
Jake Potrebic
caf899f62b Deprecate Material#isInteractable (#9216) 2023-11-11 14:21:22 -08:00
booky10
e6ad4fadf4 Add hand to fish event for all player interactions (#9929) 2023-11-11 23:00:45 +01:00
Jake Potrebic
932b0256c7 Use ApiStatus.Internal instead of Deprecated (#9042)
Mainly correctly marks a lot of still used "magic values"
as Internal instead of "Deprecated".
2023-11-11 13:52:32 -08:00
booky10
cbce3a66aa Add aggressive mob API (#9838) 2023-11-11 22:17:36 +01:00
Owen1212055
5cca94a05e Add Entity Movement Direction API (#7085)
This allows you to get player movement when riding vehicles, etc.
2023-11-11 16:04:34 -05:00
Jake Potrebic
aa933b773e Updated Upstream (Bukkit/CraftBukkit) (#9922)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
fde5602a PR-927: Add PlayerRecipeBookSettingsChangeEvent
949ff217 PR-930: Add methods to get/set evoker fang attack delay
f6f7c79d SPIGOT-7514, PR-929: Add "Enchantment Roll" API to enchant items according to Minecraft mechanics
d40e22da PR-712: Add API to get full result of crafting items

CraftBukkit Changes:
c8feb0629 PR-1291: Improve precondition message in Entity#playEffect
482c56a00 PR-1285: Add PlayerRecipeBookSettingsChangeEvent
cdf798800 PR-1290: Add methods to get/set evoker fang attack delay
2c1b5f78f SPIGOT-7514, PR-1289: Add "Enchantment Roll" API to enchant items according to Minecraft mechanics
6aa644ae9 PR-992: Add API to get full result of crafting items
ffb1319bc PR-1287: Fix scoreboards not updating in Player#setStatistic
2023-11-11 12:25:45 -08:00
Luis
316e921c18 Add Enchantment cost API (#9856)
Cost is a property of individual enchantments, and is used by vanilla in combination with environmental aspects like tool enchantability and bookshelf count to determine the final cost of an enchantment as shown in an enchanting table.

Having access to the base cost of an enchantment using these vanilla methods can allow plugin developers to determine the "value" of an enchantment, and use it in custom logic where needed. I came across this recently when trying to assign an economic value to enchantments during tool repairing, and noticed these values don't seem to be obtainable under the current API.
2023-11-11 21:09:48 +01:00
Tamion
95ec1d2acb Fix strikeLightningEffect powers lightning rods & clears copper (#9780)
* Fix strikeLightningEffect powers lightning rods and clears copper

* Fixed vanilla behavior break

* rebase

* revert spigot cleanup and remove setter

* better fix for behaviour break

* rebase and clean

* fix
2023-11-11 21:09:14 +01:00
Jake Potrebic
de45308069 Don't unpack loot table for TEs not in world (#9918)
Fixed by 23w44a/1.20.3
2023-11-11 11:23:12 -08:00
Shane Freeder
3cf895a891 Don't leave the NearbyPlayers tracker in an entirely busted state on double-add detection 2023-11-05 22:15:38 +00:00
Jason Penilla
6951909f8d Bump tiny-remapper for Java 21 support (#9902) 2023-11-04 20:33:04 -07:00
Layla Silbernberg / LadySilver47
244e4b2322 Added missing enchantables to material tags (#9888) 2023-11-05 00:37:51 +01:00
Tamion
8e8bb348c6 Add more API to LingeringPotionSplashEvent (#9901)
* Add createAreaEffectCloud API

* Add missing NotNull

* Add missing Paper comments

* Better solution

* Better naming

* New patch and rename

* rename patch
2023-11-05 00:24:06 +01:00
NonSwag
8d39b63d19 fix secure profile with proxy online mode (#9700) 2023-11-05 00:12:47 +01:00
booky10
7cd33fbd26 Broadcast take item packets with collector as source (#9884)
This fixes players (which can't view the collector) seeing item pickups with themselves as the target.
2023-11-04 23:16:55 +01:00
TonytheMacaroni
e83e680321 Add predicate for block when raytracing (#9691)
* Add predicate for block data when raytracing blocks

* Match based on block, instead of block data

* Use instanceof instead of casting

* Use Position instead of Location, add overload for rayTraceEntities

* Implement requested changes

* Invert predicate

* Cleanup
2023-11-04 18:00:51 -04:00
TrollyLoki
6e88b4fa1e Add API to get the collision shape of a block before it's placed (#9821)
* Add API to get the collision shape of a block before it's placed

* Tweak API documentation

* Clarify behavior

* Rebase

* Rebase
2023-11-04 17:32:10 -04:00
Jake Potrebic
c690244527 Fix a bunch of stuff with player spawn locations (#9887)
If a playerdata doesn't contain a valid, loaded world, reset
to the main world spawn point
2023-11-04 14:11:55 -07:00
powercas_gamer
5cfbe38b31 Make Team extend ForwardingAudience (#9852) 2023-11-04 21:50:56 +01:00
booky10
d1c10d63dc Add entity API for getting the combined gene of a Panda (#9891) 2023-11-04 21:28:23 +01:00
Tamion
5a34a7c895 Deprecate Player#boostElytra (#9899)
The Paper method was chosen for deprecation because it was more
restrictive in that it has an isGliding check.
2023-11-04 21:20:13 +01:00
Jake Potrebic
0609eeadec Use a server impl for hopper event to track get/setItem calls (#9905)
* Use a server impl for hopper event to track getItem/setItem calls

* Rebase

* Comments
2023-11-04 12:58:40 -07:00
Warrior
2cef1cc67e Include packet class name in packet encoding error messages (#9907) 2023-11-04 20:34:34 +01:00
booky10
939f31d33c Remove "fix-curing-zombie-villager-discount" exploit option (#9895) 2023-11-04 20:20:01 +01:00
Lulu13022002
ab5fa1f224 Remove duplicate water-sensitivity damage for unaware mobs (#9908) 2023-11-04 20:10:27 +01:00
Warrior
3230dd880e Add raw iron & raw copper blocks to anti xray defaults (#7622) 2023-11-04 16:07:48 +01:00
TomTom
913522cb6b Readd 0414 use distance map to optimise entity tracker (#9868) 2023-11-03 15:05:57 +01:00
Nassim Jahnke
0d2a5216f6 Add another slot sanity check 2023-11-03 14:49:55 +10:00
Md5Lukas
c0e6952a9a Fix villager infection chance not being handled properly (#9897) 2023-11-01 22:59:00 +01:00
Jake Potrebic
374f24c159 Fix NPE when no valid world is found on legacy Players (#9885) 2023-10-29 08:33:32 -07:00
booky10
5df63ec242 Fix entity camera not being reset when cancelling spectating start/stop events (#9883) 2023-10-29 02:45:07 +02:00
Shane Freeder
5165228828 [ci skip] Fix module derp 2023-10-29 01:32:13 +01:00
Shane Freeder
03bd83a051 [ci skip] Fix author in last patch 2023-10-29 00:58:15 +01:00
Gero
79f1f1ba5e Implement Velocity VarInt optimizations (#8418)
---------

Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2023-10-29 01:56:47 +02:00
booky10
ccfb6b4680 Add player idle duration API (#9833)
* Add player idle duration API

Implements API for getting, setting and resetting a player's idle duration.

* Remove idle duration setter

* Rebase
2023-10-29 01:25:46 +02:00
caramel
1dcda2491e fix UnsafeValues#loadAdvancement doesn't recalculate position (#9846) 2023-10-29 08:13:33 +09:00
Kenox
f48bd30f89 Fix warden spawn reason from DEFAULT to NATURAL (#8744) 2023-10-29 01:10:31 +02:00
caramel
c7b9f77124 Cleanup disable explosion knockback patch (#9858) 2023-10-29 07:50:26 +09:00
Tamion
8222e33a11 Fix PotionAPI ignores icon flag (#9864)
* fix PotionAPI ignores icon flag

* also fix CraftPotionUtil#toBukkit

* also CraftPotionUtil#fromBukkit

* use CraftPotionUtil
2023-10-29 00:39:47 +02:00
Warrior
9db92731a1 Fix crash when version_history.json is empty (#9871) 2023-10-29 00:24:54 +02:00
SplotyCode
22672b4be2 Fix null item in sendEquipmentChange (#9869) 2023-10-29 00:15:20 +02:00
Jake Potrebic
06ac3424fa Updated Upstream (Bukkit/CraftBukkit) (#9876)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
19830133 PR-925: Add hit entity/block to events extending ProjectileHitEvent

CraftBukkit Changes:
5a72c3c04 SPIGOT-7510: Try to fix broken reflection usage of plugins
6fa69f235 PR-1281: Add hit entity/block to events extending ProjectileHitEvent
224f733ac Fix NPE introduced in #f4d977e
2023-10-28 15:02:13 -07:00
Lulu13022002
8f1cb77f10 Resend entity using the bundle packet (#9853) 2023-10-27 15:48:13 +02:00
Jason Penilla
cd2ebaa455 Update paperweight to 1.5.9 (#9872) 2023-10-26 16:34:58 -07:00
Jake Potrebic
3a4d982c0f Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9861) 2023-10-26 14:56:40 -07:00