Commit graph

2446 commits

Author SHA1 Message Date
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
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
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
Jason Penilla
5abcfb3d6b Fix log level of advancement debug message (#9860) 2023-10-23 10:07:44 -07:00
Jake Potrebic
5f694a81ab Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9825)
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:
897a0a23 SPIGOT-5753: Back PotionType by a minecraft registry
255b2aa1 SPIGOT-7080: Add World#locateNearestBiome
ff984826 Remove javadoc.io doc links

CraftBukkit Changes:
71b0135cc SPIGOT-5753: Back PotionType by a minecraft registry
a6bcb8489 SPIGOT-7080: Add World#locateNearestBiome
ad0e57434 SPIGOT-7502: CraftMetaItem - cannot deserialize BlockStateTag
b3efca57a SPIGOT-6400: Use Mockito instead of InvocationHandler
38c599f9d PR-1272: Only allow one entity in CraftItem instead of two
f065271ac SPIGOT-7498: ChunkSnapshot.getBlockEmittedLight() gets 64 blocks upper in Overworld

Spigot Changes:
e0e223fe Remove javadoc.io doc links
2023-10-22 12:12:00 -07:00
Shane Freeder
69b2101f34 Temp fix for serialisable blockdata 2023-10-22 19:56:25 +01:00
MiniDigger | Martin
44214b0015 [ci skip] cleanup some ATs (#9840) 2023-10-22 02:17:55 +02:00
Lulu13022002
64b1b0fc06 Fix NPE in SculkBloomEvent world access (#9857) 2023-10-21 22:20:24 +02:00
Brokkonaut
0049c47717 Don't check if we can see non-visible entities 2023-10-21 20:53:33 +01:00
Spottedleaf
be034cd985 Initialise default nibble arrays in ChunkAccess directly
When ChunkAccess was converted to an abstract class some versions
ago, the code to initialise nibble arrays should have been moved.
However, the code was not moved and so now mods constructing their
own implementations of ChunkAccess would not have the nibble arrays
initialised.

This is ported to Paper from Starlight to keep the code base in sync,
not because it fixes anything known.
2023-10-16 18:57:45 -07:00
Spottedleaf
b119425c8e Fix mushrooms not generating in swamps
During feature generation, light data is not initialised and
will always return 15 in Starlight. Vanilla can possibly return
0 if partially initialised, which allows some mushroom blocks to
generate.

In general, the brightness value from the light engine should not
be used until the chunk is ready. To emulate Vanilla behavior better,
we return 0 as the brightness during world gen unless the target
chunk is finished lighting.

The regular light retrieval outside of WorldGenRegion remains
the same, as behaviorally chunks not lit should be at max
skylight and zero block light.
2023-10-16 18:52:28 -07:00
Spottedleaf
b6f04d399f Remove unused skyLightSources
There is no point in initialising the sources in Starlight,
as we do not use them. Additionally, they are not saved to
disk so we do not need them.

Maintaining and initialising them is not a negligible cost,
which is why they are being removed.
2023-10-16 18:49:41 -07:00
caramel
664d59e3d7 sync netty version with vanilla (#9842) 2023-10-15 23:41:17 +09:00
caramel
ee307c382a fix recipe packet limiter (#9841) 2023-10-15 23:11:15 +09:00
Md5Lukas
6dea0a9f7c Add additional tags to ItemMeta obfuscation filtering (#9665) 2023-10-14 23:41:15 +02:00
Md5Lukas
c7a0d627ba Add BlockData setter for FallingBlock (#9829) 2023-10-14 22:46:31 +02:00
Jakub Zacek
e7c0e0e246 Replace bukkit Consumers with java consumers (#9836) 2023-10-14 22:43:32 +02:00
froobynooby
2b426027aa Don't call options events on login (#9834)
* Don't call options events on login

* Merge changes into client options API patch
2023-10-15 04:02:00 +09:30
SplotyCode
c5941e1633 Fix CraftPlayerProfile#setId regression (#9822) 2023-10-12 03:20:25 +02:00
Jake Potrebic
2e77a0596d add predicate recipe choice only for potion mixes (#9486) 2023-10-10 16:07:21 -07:00
Tamion
e47183454e Fix PlayerSwapHandItemsEvent NPE when a hand set to null (#9763)
* Fix PlayerSwapHandItemsEvent throwing exception when mainhand or offhand set to null

* use fully qualified import

* Use ItemStack#empty() instead of new ItemStack

* Add NotNull annotation to getters

* Add missing Paper comments
2023-10-11 00:38:25 +02:00
caramel
ae7dded514 Fix UnsafeValues#loadAdvancement (#9753) 2023-10-11 07:19:00 +09:00
Jake Potrebic
93647d2dd6 fix flat bedrock world config (#9728) 2023-10-10 14:43:10 -07:00
TrollyLoki
62d89ef9e4 Make setVelocity method of Fireballs change the travel direction to an arbitrary vector (#9815) 2023-10-10 17:09:45 -04:00
Xander de Keijzer
ec584ef1c3 Fix painting loosing art on face change (#9798) 2023-10-10 22:24:35 +02:00
Jake Potrebic
a404d35d91 Fixes for loot tables (#9818) 2023-10-10 10:35:49 -07:00
Spottedleaf
ad8f4803d3 Make EntityLookup#get use read lock for entity maps
On Folia, this map is modified by multiple threads and iterating
it may throw errors, for example using the /kill command or any
other command that uses an entity selector.
2023-10-09 10:02:37 -07:00
Warrior
e331557dfc Move clientBrandName over to ServerPlayer (#9809) 2023-10-08 13:07:48 +03:00
Bjarne Koll
2595ee0356 Properly check water block when random ticking ice (#9804)
Readds a lost update to the shared mutable state in the random block
ticking optimisation.
2023-10-06 22:34:00 +02:00
Nassim Jahnke
5944323d84 Fix item effects conversion if no tag is present
Fixes #9796
2023-10-05 16:03:26 +10:00
Nassim Jahnke
8ae1a1746e Fixup player profile getters and constructor to expected nullability (#9770) 2023-10-05 15:31:24 +10:00
Warrior
b0704c757b Fix mobs not spawning when using an older config (#9793) 2023-10-04 20:08:47 +03:00
Shane Freeder
13884a0748 Quick tweaks to logical flow of getMapData 2023-10-04 16:25:26 +01:00
booky10
a09f1713bf Fix entity data not updated for firework attached to entity (#9783) 2023-10-04 03:29:44 +02:00
Jake Potrebic
c4f40ca864 update configurate (#9230) 2023-10-03 18:06:23 -07:00
Nassim Jahnke
c18dea2d80 Fix tests 2023-10-04 07:58:30 +10:00
Nassim Jahnke
7d1b302774 Implement tracking range y setting 2023-10-03 22:19:39 +10:00
Nassim Jahnke
a4d2616808 Updated Upstream (Bukkit/CraftBukkit/Spigot)
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:
09b1c123 PR-916: Add more lightning API
c085f3de PR-859: Add Entity#getTrackedBy

CraftBukkit Changes:
1bf30a4e9 SPIGOT-7495: Spawning bee entity in asynchronous BlockPopulator causes IllegalStateException - Accessing LegacyRandomSource from multiple threads
476c5bccd PR-1267: Add more lightning API
40d5e6c02 PR-1190: Add Entity#getTrackedBy
40d41acc1 SPIGOT-7491: Downgrade bundled SQLite to be updated next release
44b31da38 PR-1264: Load Bukkit class before creating Registry item
dc45a6738 SPIGOT-7496: Failure to load datapacks with multiple identical predicates
f508657d6 Fix decompile error affecting javac
ef7a4743d PR-1265: Ensure UTF-8 used in new test resource

Spigot Changes:
224dad51 Rebuild patches
2023-10-03 21:55:12 +10:00
Lulu13022002
9b7863a607 Some jd fixes (#9781) 2023-10-01 02:20:51 +02:00
Nassim Jahnke
696a5041a0 Don't throw when removing unplaced player in NearbyPlayers 2023-09-30 15:37:00 +10:00
Nassim Jahnke
933793244c [ci skip] Fix typo (important) 2023-09-29 13:20:32 +10:00
Nassim Jahnke
a5cf9bd970 Updated Upstream (Bukkit/CraftBukkit/Spigot)
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:
044d4ee9 SPIGOT-7283, SPIGOT-7318: Add AsyncStructureGenerateEvent and BlockState cloning
57b73d57 PR-913: Deprecate Projectile#doesBounce() and #setBounce()
43373c44 PR-904: Update FeatureFlag for 1.20.2
a7bbbf0c PR-911: Expand DataPack API with 1.20.2 pack version methods
0341e3a0 SPIGOT-7489: Add TeleportDuration to Display Entity
bcd8d2aa PR-912: Update Minecraft Wiki URLs

CraftBukkit Changes:
99aafc222 Increase outdated build delay
dab849f08 SPIGOT-7283, SPIGOT-7318: Add AsyncStructureGenerateEvent and BlockState cloning
041b29ae3 Upgrade specialsource-maven-plugin
851a32cff PR-1263: Remove unused implementation of AbstractProjectile#doesBounce() and #setBounce()
251af0da3 PR-1261: Expand DataPack API with 1.20.2 pack version methods
46e4ba627 Upgrade specialsource-maven-plugin
df3738a24 SPIGOT-7489: Add TeleportDuration to Display Entity
8d0fea457 PR-1262: Update Minecraft Wiki URLs
e62905aab SPIGOT-7490: Fix entity equipment updates

Spigot Changes:
a0f3d486 Rebuild patches
2023-09-29 10:28:26 +10:00
Jake Potrebic
8e2e1e5208 Fix creating the reverse map for loot table keys (#9766) 2023-09-28 16:29:34 -07:00
Spottedleaf
d7561e90f0 Properly call overloaded super onDisconnect
Since the method is overloaded, the call to super (which is changed
to call the overloaded method) without the additional parameters
will result in recursion.
2023-09-26 13:16:21 -07:00
Spottedleaf
ec66a2c91c Fire PlayerConnectionCloseEvent for configuration packet listener
If the player moves to the configuration stage, we also need
to fire the event.
2023-09-26 09:20:17 -07:00
Spottedleaf
68e28c6750 Fix VoxelShape#isFullBlock() for non-single AABB types
The correct logic to implement NOT_SAME with Shapes#block()
is to test whether any shape data exists outside of [0.0, 1.0]
and to test whether the shape is completely filled from 0.0 to 1.0
on all axis. This can be implemented by checking whether the
bounds represent the full block and whether everything within
the bounds is filled.
2023-09-26 09:16:11 -07:00
Jake Potrebic
9c0b169922 Fix tests that broke during the junit 5 update (#9757)
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2023-09-24 16:05:05 -07:00
Shane Freeder
3ebe415f47 Fix/update wiki (#9758) 2023-09-25 00:02:46 +01:00
Shane Freeder
1a1af91ce3 Handle new brand payload type 2023-09-24 19:48:29 +01:00
Warrior
2474c6ac97 Fix missing map initialize event call & missing map id assignment (#9756) 2023-09-24 21:17:29 +03:00
Nassim Jahnke
358877e2e2 Updated Upstream (Bukkit/CraftBukkit)
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:
fb23cbb3 Define surefire plugin version
d022084a Define ordering for MetadataStoreTest
99a7f6f0 PR-910: Match generic max absorption attribute name style with the rest
c7390d71 PR-909: Update tests to JUnit 5

CraftBukkit Changes:
f0661c351 PR-1230: Move unstructured PDC NBT serialisation to SNBT
452fcb599 PR-1256: Update tests to JUnit 5
2023-09-24 17:16:58 +10:00
Spottedleaf
63a40050bd Re-add remove streams for Brain AI patch 2023-09-23 23:38:51 -07:00
Spottedleaf
0ef267f0e7 Optimise nearby player retrieval
Instead of searching/testing every player online on the server,
we can instead use the nearby player tracking system to reduce
the number of tests per search.
2023-09-23 23:16:45 -07:00
Nassim Jahnke
9abaff8a66 Use correct ClientboundLevelChunkWithLightPacket constructor in later patch 2023-09-24 16:29:07 +10:00
Jake Potrebic
6c18da61ba Fix some issues 2023-09-23 22:33:17 -07:00
Spottedleaf
7834ec5bcc Fix race condition on UpgradeData.BlockFixers class init
The CHUNKY_FIXERS field is modified during the constructors
of the BlockFixers, but the code that uses CHUNKY_FIXERS does
not properly ensure that BlockFixers has been initialised before
using it, leading to a possible race condition where instances of
BlockFixers are accessed before they have initialised correctly.

We can force the class to initialise fully before accessing the
field by calling any method on the class, and for convenience
we use values().
2023-09-23 22:15:09 -07:00
Spottedleaf
0e092b4f36 Add lag compensation for breaking blocks 2023-09-23 22:10:40 -07:00
Spottedleaf
a20286c5a8 Optimise chunk tick iteration
When per-player mob spawning is enabled we do not need to randomly
shuffle the chunk list. Additionally, we can use the NearbyPlayers
class to quickly retrieve nearby players instead of possible
searching all players on the server.
2023-09-23 21:43:10 -07:00
Nassim Jahnke
0b16cce6e6 Drop no longer needed patch 2023-09-24 13:09:52 +10:00
Nassim Jahnke
886e4f56b5 Readd anti xray and oversized block entity patches 2023-09-24 12:35:16 +10:00
Noah van der Aa
0b0aa1201b Migrate paper log ips option to new server.properties option 2023-09-23 21:37:26 +02:00
Jason Penilla
72cd5b183d Add missing kick event cause 2023-09-23 08:50:32 -07:00
Lulu13022002
8560e471b8 Fix SuspiciousStewMeta 2023-09-23 16:41:51 +02:00
Lulu13022002
645afb11f7 fix test 2023-09-23 13:38:46 +02:00
Owen1212055
1b5c9db2e2 Remove Spigot Bug Fix for MC-109346 2023-09-23 01:51:40 -04:00
Owen1212055
9a66eb3eaa Support Paper ip address config + add missing logs 2023-09-23 01:50:13 -04:00
Nassim Jahnke
17f71281d2 Updated Upstream (Bukkit/CraftBukkit)
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:
dfe1fb48 PR-906: Add missing MinecraftExperimental annotation to Bundles
825ab30d PR-905: Add missing MapCursor.Type and update documentation
e03d10e6 PR-903: Make BARRIER Waterlogged
1961ead6 PR-898: Use Java Consumer instead of Bukkit Consumer

CraftBukkit Changes:
f71a799f0 Make BARRIER Waterlogged
172f76a45 Upgrade specialsource-maven-plugin
f0702775c SPIGOT-7486: Alternate approach to null profile names
069495671 SPIGOT-7485: Allow air entity items since required for Vanilla logic
5dfd33dc2 SPIGOT-7484: Cancelling PlayerEditBookEvent does not update client's book contents
02d490788 PR-1250: Standardize and centralize Bukkit / Minecraft registry conversion
9024a09b9 PR-1251: Use Java Consumer instead of Bukkit Consumer
6d4b25bf1 Increase diff stability
2023-09-23 12:06:03 +10:00
Nassim Jahnke
663a0d893e Readd network optimization patch 2023-09-23 11:45:34 +10:00
Spottedleaf
7a108cda40 Make sure to maintain the players sent to set for ChunkHolder
Required for proper block/light updates to clients
2023-09-22 17:07:02 -07:00
Nassim Jahnke
910c6b25b9 Fix chat processing 2023-09-23 09:58:19 +10:00
Nassim Jahnke
7e02ed1a60 Fix local attribute setting 2023-09-23 09:42:59 +10:00
Nassim Jahnke
3ecca26a7b Revert "re-add distance map patch"
This reverts commit 99baa36800.
2023-09-23 09:38:10 +10:00
Jake Potrebic
99baa36800 re-add distance map patch 2023-09-22 16:26:10 -07:00
Jake Potrebic
f6d4cdfc99 fixup display slots patch (#9746) 2023-09-22 16:07:33 -07:00
Jake Potrebic
e6ae21d0c8 Fixup advancement patch (#9745) 2023-09-22 16:03:34 -07:00
Spottedleaf
15183b44de Port patches from folia dev/optimisations 2023-09-22 15:54:36 -07:00
Spottedleaf
52a9b1c91e Fix recursion with pathfind entity event
With the function overload, need to pass the entity
through to the super call
2023-09-22 15:38:31 -07:00
Spottedleaf
1efbbb3ef9 Add some patches, fix compile 2023-09-22 15:33:14 -07:00
Spottedleaf
9bf842c13e Chunk system patch 2023-09-22 13:13:57 -07:00
Jason Penilla
05f9968013 Rebuild patches 2023-09-22 10:59:56 -07:00
Jason Penilla
845d5e7a06 Move unapplied patches so ATs import 2023-09-22 10:57:13 -07:00
MiniDigger | Martin
3f4950410d some more compile fixes 2023-09-22 19:43:52 +02:00
MiniDigger | Martin
65e89bf179 some compile fixes 2023-09-22 19:31:02 +02:00
Noah van der Aa
529b5534e7 more more more more more more more more more more more work: passing the torch 2023-09-22 17:51:48 +02:00
Lulu13022002
77719b1566 some compile issues 2023-09-22 19:25:18 +02:00
Lulu13022002
fdf4e8726b more work
all server patches done (almost)
2023-09-22 18:59:52 +02:00
Lulu13022002
0925b4af6f some work 2023-09-22 18:11:35 +02:00
Noah van der Aa
411f78293c more more more more more more more more more more more work: passing the torch 2023-09-22 17:51:48 +02:00
Noah van der Aa
9e63e24f0b more more more more more more more more more more work 2023-09-22 17:35:51 +02:00
Noah van der Aa
2b7e17a127 more more more more more more more more more work 2023-09-22 17:24:59 +02:00
Noah van der Aa
26dc16de31 more more more more more more more more work 2023-09-22 17:08:04 +02:00
Noah van der Aa
d518a2739d more more more more more more more work
can't let lynx inflate his commit count too much
2023-09-22 16:58:35 +02:00
Bjarne Koll
414d8a9efe More work work work work work work work work work 2023-09-22 16:42:56 +02:00
Bjarne Koll
d2b6bfa507 Work here, work there, work for everyone 2023-09-22 16:35:40 +02:00
Bjarne Koll
dff4f6bdd5 Working hard on messing with leafs patches 2023-09-22 16:20:09 +02:00
Bjarne Koll
7f8ad55e87 More work 2023-09-22 15:47:26 +02:00
Bjarne Koll
0c48ad35ee More work work work 2023-09-22 15:32:32 +02:00
Bjarne Koll
c3c850f4fc Fix PaperAdvancementDisplay 2023-09-22 15:19:33 +02:00
Bjarne Koll
f865f927a0 More more more (more ??) more work 2023-09-22 15:15:57 +02:00
Bjarne Koll
42b9f5a66d Port sidebar slots patch 2023-09-22 14:33:54 +02:00
Bjarne Koll
b5c4a402ee More work work work 2023-09-22 14:22:24 +02:00
Bjarne Koll
2578e385d9 Missing paper comment 2023-09-22 13:42:04 +02:00
Bjarne Koll
1d8c69ef63 Fix leave message in common packet listener 2023-09-22 13:39:00 +02:00
Noah van der Aa
eee81acfb0 more more more more more more work 2023-09-22 09:24:44 +02:00
Jake Potrebic
d851baa156 and some more 2023-09-21 22:41:27 -07:00
Jake Potrebic
96a63dfb9d almost halfway done with server patches 2023-09-21 21:40:51 -07:00
Jake Potrebic
d5469c16d1 and some more patches 2023-09-21 21:05:18 -07:00
Jake Potrebic
4c24ef27fa some more patches 2023-09-21 20:29:51 -07:00
Jake Potrebic
4e0701e69d work and compile errors 2023-09-21 19:31:59 -07:00
Jake Potrebic
aca9b5cf34 even more work 2023-09-21 19:17:21 -07:00
Jake Potrebic
0fde46537f some more work 2023-09-21 15:26:51 -07:00
Jake Potrebic
4af8929055 some work 2023-09-21 15:01:00 -07:00
Noah van der Aa
4aa42e8aea more more more more more work 2023-09-21 23:04:51 +02:00
Noah van der Aa
7b6a88056c more more more more work 2023-09-21 22:35:39 +02:00
Noah van der Aa
86931baedf more more more work 2023-09-21 22:14:58 +02:00
Noah van der Aa
233b5b5bec more more work 2023-09-21 21:54:46 +02:00
Noah van der Aa
d700351d49 more work 2023-09-21 21:00:11 +02:00
Noah van der Aa
6a5bb6ffb8 rebuild old indexes, first work 2023-09-21 19:39:51 +02:00
Noah van der Aa
524eeedaa8 So it begins... 2023-09-21 19:18:04 +02:00
Jake Potrebic
efc1f99846 Updated Upstream (Bukkit/CraftBukkit) (#9739)
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:
69c7ce23 PR-990: Use Mockito instead of InvocationHandler for test mocking
997de31d PR-893: Add a stream method to Registry to make it easier to use and to avoid unnecessary wrapping
6a8ce581 Fix malformed javadoc in previous commit
26c74f6d PR-890: Add more Sculk API (bloom, shriek, bloom event)
aa067abf PR-895: Load GameEvent and MusicInstrument from registry

CraftBukkit Changes:
78796c9de Add support for Java 21
ddc9a2dad SPIGOT-7475: Don't fire SculkBloomEvent during world generation
caee2311a PR-1245: Add a stream method to Registry to make it easier to use and to avoid unnecessary wrapping
de421cf56 PR-1242: Add more Sculk API (bloom, shriek, bloom event)
00f5a80fb PR-1252: Fix error when generating a tree in water
10219df3a PR-1248: Load GameEvent and MusicInstrument from registry
2023-09-21 09:48:55 -07:00
Lulu13022002
6cc04e3081 Add missing deprecation (#8886) 2023-09-21 10:35:38 +02:00
Jake Potrebic
1830a8e09d Add missing InventoryHolders to inventories (#7400) 2023-09-17 19:16:48 -07:00
The456
68996e7286 Fix spigot's Forced-Stats (#9663) 2023-09-17 02:27:56 +01:00
Warrior
fbd79e55e5 Fix two beacon bugs (#9675) 2023-09-17 03:36:10 +03:00
Jake Potrebic
969e0a9bb7 Fix sapling observer detection and grow event (#9654) 2023-09-16 16:53:21 -07:00
Jake Potrebic
5e0a3d7ad0 [ci skip] Add missing javadoc links (#9497) 2023-09-16 16:35:39 -07:00
Lulu13022002
4d585e0587 Fix silent equipment change for mobs (#9677)
* Fix silent equipment change for mobs

* rebased and added test to make sure all overrides are added

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2023-09-17 01:27:11 +02:00
SoSeDiK
2dbdaa6b88 Cleanup old async commands patch (#8895) 2023-09-17 01:54:33 +03:00
Warrior
a624543c95 Fix leashed pets teleporting to owner when loaded (#9686) 2023-09-17 01:16:44 +03:00
Warrior
e0964c727a Add DISPLAY tracking range type (#9668) 2023-09-17 01:02:58 +03:00
Warrior
a9be834ffa Fix Projectile#setOwner(null) not clearing owner (#9715)
* Fix Projectile#setOwner(null) not clearing owner

* rebased and merged into mentioned patch

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2023-09-17 00:37:38 +03:00
thelooter
e5e00b653b Enforce sign line nullability when setting line with Adventure Method (#9689) 2023-09-16 23:18:51 +02:00
Aeltumn
90b4e9c424 Add ItemStack#isEmpty and related methods (#9664)
* Add new patches

* Change from an EMPTY static var to a static method since ItemStack is mutable

* Properly set nullability of return value

* Move annotation changes to different patch

* Send the Kotlin code back to where it came from

* rebased

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2023-09-16 23:18:09 +02:00
MiniDigger | Martin
c32a202cfd Improve java version check (#9692) 2023-09-16 23:06:36 +02:00
Jake Potrebic
38704cdea7 [ci skip] Clarify where furnace-related events are called (#8753) 2023-09-16 13:55:40 -07:00
Jake Potrebic
76744c8d52 Create raw chat type as resource file instead of in source (#9226)
Sets up the ability to load new or modified resource files into Paper.

Updates paperweight to 1.5.6

This should work with all run configs, like runDev, runShadow, runReobf as well as correctly build jars for production.
2023-09-15 11:03:42 -07:00
Warrior
537ef22fbf Call BlockRedstoneEvents for lecterns (#9721) 2023-09-15 00:17:53 +03:00
leguan
9466e0d55a compression level change with config option (#9711) 2023-09-14 13:11:19 +02:00
TreemanKing
f4883a8c07 Add Barrel to LootableBlockInventory (#9687) 2023-09-14 21:04:36 +10:00
Duckulus
8eea7a4d45 Add missing Piglin Dancing API (#8894) 2023-09-14 12:54:43 +02:00
Lulu13022002
abbdae4f53 Swap some nullable annotations (#9696) 2023-09-14 12:44:12 +02:00
Warrior
11f2c20c6a Add missing particle javadocs (#9716) 2023-09-14 05:09:09 +03:00
Nassim Jahnke
1e0babdc39 Fix line of sight distance check 2023-09-12 09:56:24 +10:00
Spottedleaf
d3a6b1376a Optimise multiple block updates occurring in the same chunk
We can avoid multiple ticket additions for the same ChunkTasks
instance. This will help in situations where significant number of
block updates occur for the same chunk in the same tick, such as
water draining.
2023-09-11 07:15:18 -07:00
violetc
19a5d6d225 Fix fixItemsMergingThroughWalls check (#9707) 2023-09-11 12:46:02 +08:00
Nassim Jahnke
021d59363b Add missing slot sanity checks for container clicks 2023-09-11 12:03:35 +10:00
Nassim Jahnke
1f4c201c00 Strip raytracing for EntityLiving#hasLineOfSight
Co-authored-by: Paul Sauve <paul@technove.co>
2023-09-10 12:28:03 +10:00
Joe
68b63a9341 Copy NBT in legacy dragon fight converter 2023-09-06 18:33:31 -07:00
Joe
14f834f0a5 Copy NBT in upgrade data neighbor ticks 2023-09-06 18:30:02 -07:00
Lulu13022002
e9d300a828 Take in account waterlogged blocks for scaffolding (#9676) 2023-09-04 17:52:27 +02:00
Md5Lukas
7366520a54 Allow non-op players to execute the click event callback (#9652) 2023-08-28 13:21:13 +02:00
Noah van der Aa
a0632a8f06 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9648)
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:
6b34da8f SPIGOT-7467: Add getAddress to RemoteConsoleCommandSender

CraftBukkit Changes:
db4ba2897 SPIGOT-7467: Add getAddress to RemoteConsoleCommandSender
4f7ff4dec PR-1246: Add missing AbstractTestingBase to tests which need them
f70a7b68d SPIGOT-7465, MC-264979: Fresh installations print NoSuchFileException for server.properties
8ef7afef6 PR-1240: Call BlockGrowEvent for vines that are growing on additional sides of an existing vine block

Spigot Changes:
d2eba2c8 Rebuild patches
2023-08-28 13:05:48 +02:00
Martijn
a9122ec448 Do crystal-portal proximity check before entity lookup (#9611) 2023-08-26 22:23:31 +02:00
Lulu13022002
d0bce54059 Add sniffer egg api (#9288) 2023-08-26 22:12:46 +02:00
Jake Potrebic
7e896541bd Add titleOverride to InventoryOpenEvent (#7540) 2023-08-26 12:28:42 -07:00
Jake Potrebic
2a49ab43f6 Fix/improve destroy speed API (#9645)
further improvements could be a method that takes in an entity
to account for effects
2023-08-25 10:57:11 -07:00
Nassim Jahnke
82aefb5454 Readd old BlockDamageEvent constructor 2023-08-25 10:19:55 +10:00
Jake Potrebic
d00071451b Fix inventory desync (#9640) 2023-08-24 16:53:02 -07:00
Aeltumn
4935180134 Add OfflinePlayer#isConnected (#9642) 2023-08-24 13:44:31 +02:00
Jake Potrebic
6bc3eaa52a Fix exact choice recipe book clicks (#7822) 2023-08-23 08:20:32 -07:00
Warrior
c667df8ff5 Limit setBurnTime to valid short values (#9623) 2023-08-23 13:54:34 +03:00
Jake Potrebic
4e461ccab9 [ci skip] Refactor context records for easier expansion (#9589) 2023-08-22 20:34:57 -07:00
Martijn
86a90ebe3e Optimize nearest structure border iteration (#9638) 2023-08-23 03:53:42 +02:00
The456
24f6e17ded Expose Hand during BlockCanBuildEvent (#9636) 2023-08-23 01:41:30 +01:00
Bjarne Koll
60d2ea03ad Prevent overfilled bundles from duplicating items (#9633)
Bundles compute the amount to remove from an item based on the formula
(64 - currentWeight) / itemWeight. An overfilled bundle however, with a
currentWeight of > 64 ends up with a negative removal amount for the
item.

This can cause duplication issues on craftbukkit inventory
implementations as they do currently not gracefully handle negative
removal amounts in their remove methods.
2023-08-22 11:57:44 +02:00
Lulu13022002
a92fdba593 Allow custom damage for trident (#8132) 2023-08-22 08:20:38 +02:00
Lulu13022002
b6c058204f Fix endgateway teleportation offset (#9517) 2023-08-22 08:03:15 +02:00
Jake Potrebic
fc035b6403 Improve performance of mass crafts (#9603) 2023-08-21 22:54:28 -07:00
Rodney
73600b72b6 Add PlayerPickItemEvent (#5590) 2023-08-22 07:22:05 +02:00
SoSeDiK
7e34587a54 Properly clone custom nbt tags inside ItemMeta (#7849) 2023-08-22 07:59:31 +03:00
Jake Potrebic
c18117104b More DragonBattle API (#5655) 2023-08-21 21:08:43 -07:00
Joo200
a02a484a57 MerchantRecipe: add copy constructor (#8703) 2023-08-22 05:48:25 +02:00
aerulion
dad6cfe6c4 Expose clicked BlockFace during BlockDamageEvent (#9632) 2023-08-22 05:07:18 +02:00
SoSeDiK
1316321c7f Expand Pose API (#8781) 2023-08-22 06:05:47 +03:00
caramel
d369e65fab Fix NPE on Boat#getStatus (#9115) 2023-08-22 11:57:54 +09:00
Bjarne Koll
623478709c Remove unused lag-compensate-block-breaking option (#9635)
Removes the unused lag-compensate-block-breaking option from the paper
configuration file as the patch using it has been dropped in 1.19.
2023-08-21 14:08:25 +02:00
Corey Shupe
8aee3fc4d0 Player listing API (#8782) 2023-08-21 04:51:31 -04:00
ruViolence
79152ad03a Add entity tracker min Y distance config option (#9406) 2023-08-21 16:05:49 +08:00
Jake Potrebic
1b4291893f Improve cancelling PreCreatureSpawnEvent with per player mob spawns (#9400) 2023-08-21 00:44:47 -07:00
Yannick Lamprecht
183462c9f0 Add cancellability to PlayerTrackEntityEvent (#8605) 2023-08-21 09:38:55 +02:00
TonytheMacaroni
b0439eea91 Add Entity Coordinate and Rotation API (#9461) 2023-08-21 03:35:05 -04:00
Will FP
bd8dd4f684 Fixed CraftItemStack/CraftItemMeta enchantment level inconsistency (#8792)
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
2023-08-21 08:31:52 +01:00
Trevor Bedson
d8b5390f81 Fire entity death event for ender dragon (#9495) 2023-08-21 03:06:21 -04:00
Gero
68a69e380c Fix CME in CraftPersistentDataTypeRegistry (#6701) 2023-08-21 06:50:21 +02:00
EpicPlayerA10
77c6859b66 Don't tab-complete namespaced commands if send-namespaced is false (#9366) 2023-08-21 06:50:11 +02:00
galacticwarrior9
e526eafa39 Determine lava and water fluid explosion resistance by their block explosion resistance (#9482) 2023-08-21 05:50:02 +01:00
Gameoholic
42e6758cb4 Fix rotation for spawning display entities (#9552) 2023-08-21 07:49:53 +03:00
EpicPlayerA10
e121a90eef Add option to disable chorus plant and mushroom block updates (#9442) 2023-08-21 06:49:38 +02:00
Md5Lukas
a2846ba80b Fix Inventory#getLocation not working for the composter (#9596) 2023-08-21 06:49:29 +02:00
Jake Potrebic
7e6bdb92a4 Properly handle BlockBreakEvent#isDropItems (#8936)
Setting whether a block break dropped items controlled
far more than just whether blocks dropped, like stat increases
food consumption, turtle egg count decreases, ice to water
conversions and beehive releases
2023-08-20 20:49:20 -07:00
Jake Potrebic
06ee045ab9 Deprecate and replace methods using deprecated StructureType (#8643) 2023-08-20 10:30:45 -07:00
Jake Potrebic
975d0562a7 API for an entity's scoreboard name (#9462)
Was obtainable through different methods, but you had to use different
methods depending on the implementation of Entity you were working with.
2023-08-20 09:06:09 -07:00
Nassim Jahnke
564ba7b184 Fix unknown entity interaction clicked position getter if null 2023-08-19 12:01:06 +10:00
Martijn
a925383693 Count down radius-aware dependency tree node parents (#9600) 2023-08-18 04:02:20 +02:00
Jamie
95371f3cdf Delete patch to fix PaperMC/Paper#9612 (#9621) 2023-08-17 21:51:34 +01:00
Nassim Jahnke
84993c1413 Add clicked position to PlayerUseUnknownEntityEvent (#9604) 2023-08-16 17:58:07 +10:00
Bjarne Koll
f5719c0b4a Don't let player loot if reloot time is disabled (#9615)
If the reloot time is disabled while reloot is restricted, the player
should not be able to reloot. The previous logic was incorrect and
allowed players to reloot explicitly when the reloot time was disabled.
2023-08-16 06:08:00 +02:00
Warrior
49502449bb Fix main thread priority being lowered (#9488) 2023-08-15 19:37:17 +02:00
Jake Potrebic
975444e5d2 Updated Upstream (CraftBukkit/Spigot) (#9598)
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

CraftBukkit Changes:
b76ceb4f5 PR-1235: Move EntityType return to base Entity class
e795d7490 SPIGOT-7458: Exception when Entity CommandSender executes Vanilla command
46c7fc3b1 SPIGOT-7452: Player#openSign cannot edit
d91e5aa0b SPIGOT-7447: Rewrite --forceUpgrade to minimise diff and properly handle CraftBukkit world layout
921ae06d6 Revert "SPIGOT-7447: Fix --forceUpgrade"

Spigot Changes:
94e187b5 Rebuild patches
3bce7935 SPIGOT-7091: Update bungeecord-chat
2023-08-13 16:32:51 -07:00
Jake Potrebic
224e38a0f6 Account for dimension type in portal void damage check (#9602) 2023-08-13 13:30:48 -07:00
Warrior
93f4d6f535 Fix DEFAULT getEntitySpawnReason for /summon (#9480) 2023-08-13 01:57:13 +02:00
Nacioszeczek
203115c88f SculkCatalyst bloom API (#9466) 2023-08-13 01:31:32 +02:00
Jake Potrebic
2e3118d02a Bandaid fix for Effect (#9548)
Effect or LevelEvent needs to be replaced
but ideally after the enum PR has been merged
upstream. Until then, this test and these fixes
should address all the known issues with them
2023-08-12 15:19:34 -07:00
Noah van der Aa
d96d1cb7dd Fix custom statistic criteria creation (#9595) 2023-08-12 23:50:21 +02:00
Jake Potrebic
3d0d1cb6ae Add restrict-player-reloot-time config (#7652) 2023-08-12 14:26:47 -07:00
montlikadani
4e4417723a Fix players are invisible after using setPlayerProfile (#9143)
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2023-08-12 16:10:09 +02:00
Warrior
b45d8b401b Cache map ids on item frames (#9584) 2023-08-12 15:33:24 +02:00
Warrior
cf16a1eeb4 Make the cursor limit option apply to banners (#9554) 2023-08-10 15:22:40 +02:00
Spottedleaf
7843c4c1f1 Remove UpgradeData neighbour ticks outside of range
The lists are only supposed to contain ticks for the 1 radius
neighbours of the chunk.
2023-08-09 14:05:57 -07:00
Florian Schmidt
c8a5db2f15 Use correct seed on api world load (#9541) 2023-08-09 01:35:15 +02:00
Warrior
31138ad3fc Fix wild wolves not considering bones interesting (#9579) 2023-08-09 01:15:01 +02:00
Jake Potrebic
99edfc5832 Respect randomizeData on more entities when spawning (#9483) 2023-08-08 16:07:59 -07:00
Warrior
2973f71a46 Use correct source for mushroom block spread event (#9587) 2023-08-09 00:51:58 +02:00
Nassim Jahnke
c0bced1fa1 Don't put entities removed during the portal exit event into an invalid state 2023-08-08 17:48:55 +10:00