Commit Graph

7940 Commits

Author SHA1 Message Date
Jake Potrebic
836586d59b
Fix missing item types in SlotType for armor change event (#9379)
Also added 2 parameterized tests to make sure this doesn't happen
again.
2023-07-13 13:09:26 -07:00
Owen
92bc19b049
Fix missing item interaction cancelling case (#9427)
Properly cancels brushes now
2023-07-13 15:48:46 -04:00
Lulu13022002
1f8ca77bb6
Prevent desync for poi and pistons (#9270) 2023-07-13 15:22:05 -04:00
Jake Potrebic
a60eeb85f5
Fix mob breaking doors not spawning particles (#9443)
This is a vanilla issue reported as MC-263999
2023-07-13 12:11:27 -07:00
Pedro
a3c760e6af
Handle block state in EntityDamageByBlockEvent (#9396) 2023-07-12 12:12:12 -07:00
Nassim Jahnke
f9473d9928
[ci skip] Add gradle wrapper validation action 2023-07-11 23:25:02 +02:00
Jake Potrebic
b3dc7a3b4b
fix item meta for tadpole buckets (#9473) 2023-07-11 11:52:11 -07:00
chickeneer
805fdd83b3
Add deprecations to SignSide string methods (#9467) 2023-07-11 09:58:08 -07:00
Warrior
6b325cd6a9
Array backed synched entity data (#9460) 2023-07-10 15:27:50 +02:00
Jake Potrebic
5de0f8ac48
Add Sign#getInteractableSideFor (#9388) 2023-07-08 11:04:19 +02:00
Jake Potrebic
e105354330
Fix incorrect new blockdata in EntityChangeBlockEvent (#9445)
Also fixes EntityBreakDoorEvent not having the correct 'to' block data

Also standardizes how to handle EntityChangeBlockEvent before a removeBlock or destroyBlock
call. Always use 'state.getFluidState().createLegacyBlock()' to get the new state instead of
just using the 'air' state.
2023-07-07 10:25:36 -07:00
Jake Potrebic
d7d3f6371e
[ci skip] Use Nullable annotation for Entity source (#9435) 2023-07-06 20:38:46 -07:00
Spottedleaf
48ea66e97f Optimize player lookups for beacons
For larger ranges, it's better to iterate over the player list
than the entity slices.
2023-07-06 20:18:33 -07:00
Shane Freeder
dadd8b5a7c
Don't allow for supporting block checks to load chunks
I cannot test this due to lack of hardware (took 30 minutes getting paper
updated and loaded into IJ on this machine...), however, this is the easiest
patch for now. Ideally, some form of distance check would probably be added to
improve invalidation of this cache.
2023-07-06 02:55:19 +01:00
Lulu13022002
12c970097d
Fix ThrownEggHatchEvent#setHatching (#9448) 2023-07-05 09:46:12 +02:00
Nassim Jahnke
c0936a71bd
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9440)
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:
01aa02eb PR-858: Add LivingEntity#playHurtAnimation()
9421320f PR-884: Refinements to new ban API for improved compatibility and correctness
37a60b45 SPIGOT-6455, SPIGOT-7030, PR-750: Improve ban API
4eeb174b All smithing inventories are now the new smithing inventory
f2bb168e PR-880: Add methods to get/set FallingBlock CancelDrop
e7a807fa PR-879: Add Player#sendHealthUpdate()
692b8e96 SPIGOT-7370: Remove float value conversion in plugin.yml
2d033390 SPIGOT-7403: Add direct API for waxed signs
16a08373 PR-876: Add missing Raider API and 'no action ticks'

CraftBukkit Changes:
b60a95c8c PR-1189: Add LivingEntity#playHurtAnimation()
95c335c63 PR-1226: Fix VehicleEnterEvent not being called for certain entities
0a0fc3bee PR-1227: Refinements to new ban API for improved compatibility and correctness
0d0b1e5dc Revert bad change to PathfinderGoalSit causing all cats to sit
648196070 SPIGOT-6455, SPIGOT-7030, PR-1054: Improve ban API
31fe848d6 All smithing inventories are now the new smithing inventory
9a919a143 SPIGOT-7416: SmithItemEvent not firing in Smithing Table
9f64f0d22 PR-1221: Add methods to get/set FallingBlock CancelDrop
3be9ac171 PR-1220: Add Player#sendHealthUpdate()
c1279f775 PR-1209: Clean up various patches
c432e4397 Fix Raider#setCelebrating() implementation
504d96665 SPIGOT-7403: Add direct API for waxed signs
c68c1f1b3 PR-1216: Add missing Raider API and 'no action ticks'
85b89c3dd Increase outdated build delay

Spigot Changes:
9ebce8af Rebuild patches
64b565e6 Rebuild patches
2023-07-04 10:22:56 +02:00
Lulu13022002
4356758b64
Call missing BlockDispenseEvents (#8518)
* Call missing BlockDispenseEvent

* Avoid duplicate event

* Show a single item for event

* Move glowstone refill event

* rebased

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2023-07-02 16:12:07 -07:00
Jason
171ba7ccf3
Move Log4j plugins to own source set (#9428) 2023-07-01 22:00:46 -07:00
Jake Potrebic
e16fefb443
[ci skip] add 'accepted' to Done project category (#9429) 2023-07-01 10:24:58 +02:00
Jake Potrebic
f2c1e1366a
Fix default permission for xp command (#9419) 2023-06-30 15:02:25 -07:00
Boy0000
fead63e2ea
Add option to disable NoteBlock and Tripwire updates (#9368) 2023-06-30 16:11:52 +02:00
Nassim Jahnke
225c95025b
Hotfix double entity removal making entity scheduler retire call
The assumption that the setRemoved method will never be called more than once is flawed, considering even vanilla code seems to indicate it might happen. Especially with plugins, throwing an exception is not something reasonably maintainable across all the places it *could* happen.
If it is called a second time after already having been removed due to changing dimensions, that's definitely bad, so no extra check for that
Fixes #9420
2023-06-29 17:41:32 +02:00
Jake Potrebic
437e8da700
Improve command function perm level checks (#9411) 2023-06-28 23:18:28 -07:00
Jake Potrebic
2c9c5e4662
Fix replenishable container entities save/load existing contents (#9417) 2023-06-28 11:06:47 -07:00
Pedro
82cd69fcf4
[ci skip] Update Repo style and change project url in README (#9407) 2023-06-28 10:23:05 +02:00
Jake Potrebic
e4b40ddc22
Fix entity selectors while spectating (#9402) 2023-06-27 14:46:27 -07:00
Jake Potrebic
8582999344
Deprecate duplicate chat completion methods (#9401) 2023-06-27 10:18:59 +02:00
Lulu13022002
cf0f013f53
Avoid duplicate death event call for armorstands (#9223)
* Avoid duplicate death event call for armorstands

* restore vanilla behavior (emit the game event etc...)
2023-06-26 21:22:49 -07:00
Redned
7103f813bc
Only tick item frames if players can see it (#9377)
In the event that an item frame cannot be seen by any players, ticking the item frame every tick is unnecessary. This can be a very hot section of the entity tracker when lots of item frames are present on a server, so this reduces the logic which speeds it up.
2023-06-27 00:26:29 +01:00
Bit
3f6c4b07ac
Add event for player editing sign (#9300)
Addresses https://github.com/PaperMC/Paper/issues/9293
2023-06-26 23:35:32 +01:00
Nassim Jahnke
990be1691b
Iterate over entity array copy for entity scheduler 2023-06-26 18:41:08 +02:00
powercas_gamer
e8bec64217
Fix ugly java logger format for paper plugin dependency loader (#9395) 2023-06-25 09:57:45 +02:00
Owen
b34d4ecd2e
Fix cycle on paper plugin toString (#9392) 2023-06-24 22:37:38 +01:00
Owen
aea9cdd37d
Fix interact event call override (#9387) 2023-06-23 11:03:43 -05:00
Molean
206dd3af05
Fix incorrect phantom spawning entity (#9385) 2023-06-23 12:50:29 +02:00
Samir
b1696788d6
ratelimited packet is logged to console on kick (#9292) 2023-06-21 14:36:14 +01:00
Redned
c613877e54
Fix incorrect crafting result amount for fireworks (#9322)
Although vanilla does not specifically call this method anywhere, this fixes a bug where the result using the Bukkit API returns the wrong amount.
2023-06-21 14:11:50 +01:00
Owen
3756f5bbf5
Properly Cancel Usable Items (#9225)
This fixes the bug causing canceling PlayerInteractEvent to cause items to continue to be used despite being canceled on the server.

For example, items being consumed but never finishing, shields being put up, etc.
The underlying issue of this is that the client modifies their synced data values, and so we have to (forcibly) resend
them in order for the client to reset their using item state.
2023-06-18 18:33:15 -04:00
Nassim Jahnke
1f5bec71f3
Pull Folia API take two 2023-06-18 22:46:52 +02:00
Nassim Jahnke
b1fe756b73
Revert "Move some Folia API to Paper for easy compat (#9360)"
This reverts commit d6d4c78e7d.
2023-06-18 21:47:17 +02:00
Nassim Jahnke
d6d4c78e7d
Move some Folia API to Paper for easy compat (#9360) 2023-06-18 20:02:59 +02:00
Shane Freeder
976b95c74c
Temp: Pre-init PlayerChunkLoaderData in order to prepopulate the BFS lookup cache because potatos (Closes #9338) 2023-06-18 13:49:22 +01:00
Nassim Jahnke
275173e538
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:
0c5d8709 SPIGOT-7400: Downgrade maven-resolver due to issues resolving certain depends
255c4fdb SPIGOT-7380: Add PlayerInteractEvent#getClickedPosition and ChiseledBookshelf#getSlot

CraftBukkit Changes:
b6b514b7e SPIGOT-7400: Downgrade maven-resolver due to issues resolving certain depends
fcff84de9 SPIGOT-7399: Revert null check in CraftMetaItem#safelyAdd
44a4b5649 SPIGOT-7380: Add PlayerInteractEvent#getClickedPosition and ChiseledBookshelf#getSlot
676969d01 SPIGOT-7389: Handle setting null items in ChiseledBookshelf Inventory
2023-06-18 13:18:11 +02:00
Jake Potrebic
873533b129
Add method to remove all active potion effects (#9361)
* Add method to remove all active potion effects

* use clear instead of removeAll
2023-06-17 21:10:13 -07:00
Riley Park
faf9a65b62 Disable BukkitMirrorTest 2023-06-17 14:20:46 -07:00
Jake Potrebic
072b78a713
Add trail ruins structure set seed in spigot config (#9327)
Also adds a server test to ensure the defaults match and that a seed
exists for each structure set
2023-06-17 12:12:23 -07:00
Jake Potrebic
3a0373901e
Add method to get ungenerated chunk from long key (#9254)
Also added a missing deprecation for a location block key method
2023-06-17 11:43:08 -07:00
Jake Potrebic
c1ea5502d4
Remove more outdated config settings (#9358) 2023-06-17 11:25:22 -07:00
Jake Potrebic
38856661c0
Remove stacktrace on exception from reading server.properties (#9296) 2023-06-16 19:27:45 -07:00
Spottedleaf
a226f44b45 Copy itemstack when sanitizing for datawatcher items
Since the packet is broadcasted for players, it means that
the packet will be sent to multiple players. In this case,
modifying the data results in a possible race condition
where a CME may occur as the packet will be serialized on
many different netty IO threads.
2023-06-16 10:27:59 -07:00