Commit graph

2028 commits

Author SHA1 Message Date
Sage
a218498234 Add player whitelist events (#9209) 2023-07-23 06:38:53 +02:00
JLitewski
cf0ade3ba3 Rewrote Amethyst logic to throw both BlockGrowEvent and BlockSpreadEvent (#9217)
With this patch, it is now possible to further control what plugins can do with Amethyst Blocks.
You can prevent Budding Amethyst blocks from creating shards with the BlockSreadEvent, and
when shards grow, it can be prevented with BlockGrowEvent
2023-07-22 23:54:02 -04:00
Jake Potrebic
1a750538c3 Don't support hex in book title and author (#9493) 2023-07-22 20:40:52 -07:00
Astralchroma
e5b7dd2906 Configurable Region Compression Format (#8505) 2023-07-23 01:13:48 +01:00
Owen1212055
e1adb82073 Remove sign ticking (#9478)
Minecraft now ticks signs in order to validate the playerWhoMayEdit field. This is a horrible idea, as this means that even waxed signs are ticked for essentially no reason. This moves the logic lazily onto the getter.
2023-07-22 17:00:50 -04:00
Jake Potrebic
299347e31d Fix hopper not marking source inv as changed (#9070) 2023-07-22 13:48:23 -07:00
Golfing7
5886ca41ac Make ExperienceOrb entities call EntitySpawnEvent (#9197) 2023-07-22 16:19:50 -04:00
Roman Alexander
502e9950bf Pathfinder hasPath should check if path is done. (#9231) 2023-07-23 03:04:19 +07:00
Infynyty
2eb935ac55 Mark Player.sendSignChange as deprecated (#9382) 2023-07-22 21:38:40 +02:00
Jake Potrebic
4b09cd7db0 Fix unbreakable flint and steel consumed when igniting creepers (#9509) 2023-07-19 09:16:39 -07:00
Bjarne Koll
3eab463a68 [ci skip] Fix incorrect javadoc in JarLibrary (#9513) 2023-07-19 13:51:58 +02:00
Moulberry
a4dac24ba0 Allow LEFT_CLICK_AIR in 3.0->4.5 range of entity (#9211) 2023-07-16 23:58:25 +08:00
Jake Potrebic
a31e288c20 fix 2 vanilla issues (#8940)
Fix sheeps eating grass outside ticking chunks
Fix itemframe drops dropping in correct location

Co-authored-by: BillyGalbreath <blake.galbreath@gmail.com>
2023-07-15 13:28:28 -07:00
Jason Penilla
b2a5d27433 Add back accidentally dropped Wandering Trader patch (#9492) 2023-07-14 16:23:33 -07:00
Jake Potrebic
d606a559a4 Fix possible NPE on painting creation (#9391) 2023-07-13 17:22:15 -07:00
Jake Potrebic
3114e253ce Fix BanList API (#9450) 2023-07-13 14:43:45 -07:00
Jake Potrebic
5be287d725 Add Owner UUID api for AreaEffectCloud (#9364) 2023-07-13 14:26:42 -07:00
Owen1212055
eb5257d3a5 Suppress Item Meta Validation Checks (#9331)
Stops item meta from aggressively throwing exceptions.
2023-07-13 16:59:49 -04:00
Jake Potrebic
7afebb7fb6 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
Owen1212055
16f29bd54a Fix missing item interaction cancelling case (#9427)
Properly cancels brushes now
2023-07-13 15:48:46 -04:00
Lulu13022002
6667ae5ce2 Prevent desync for poi and pistons (#9270) 2023-07-13 21:22:05 +02:00
Jake Potrebic
f78ebb6629 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
a0765eb7df Handle block state in EntityDamageByBlockEvent (#9396) 2023-07-12 15:12:12 -04:00
Jake Potrebic
8e59366f59 fix item meta for tadpole buckets (#9473) 2023-07-11 11:52:11 -07:00
chickeneer
801b2380f5 Add deprecations to SignSide string methods (#9467) 2023-07-11 11:58:08 -05:00
Warrior
2498b9ec82 Array backed synched entity data (#9460) 2023-07-10 15:27:50 +02:00
Jake Potrebic
5004933f0d Add Sign#getInteractableSideFor (#9388) 2023-07-08 02:04:19 -07:00
Jake Potrebic
c06ad72e31 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
a7bb0d20d4 [ci skip] Use Nullable annotation for Entity source (#9435) 2023-07-06 20:38:46 -07:00
Spottedleaf
40e354e38e 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
3b3cf7f532 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-05 23:13:30 +01:00
Lulu13022002
493852bbd1 Fix ThrownEggHatchEvent#setHatching (#9448) 2023-07-05 09:46:12 +02:00
Nassim Jahnke
c32c74f4ce 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
1dec9836ed 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-03 01:12:07 +02:00
Jason Penilla
772363fc92 Move Log4j plugins to own source set (#9428) 2023-07-01 22:00:46 -07:00
Jake Potrebic
7a776d1395 Fix default permission for xp command (#9419) 2023-06-30 15:02:25 -07:00
Boy0000
9628b9384b Add option to disable NoteBlock and Tripwire updates (#9368) 2023-06-30 16:11:52 +02:00
Nassim Jahnke
3e7890be06 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
6671a56ff8 Improve command function perm level checks (#9411) 2023-06-28 23:18:28 -07:00
Jake Potrebic
c163c4b6a9 Fix replenishable container entities save/load existing contents (#9417) 2023-06-28 11:06:47 -07:00
Jake Potrebic
ab8df6ba8a Fix entity selectors while spectating (#9402) 2023-06-27 14:46:27 -07:00
Jake Potrebic
4f0fa96a00 Deprecate duplicate chat completion methods (#9401) 2023-06-27 01:18:59 -07:00
Lulu13022002
94fbc95d13 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-27 06:22:49 +02:00
Redned
609047b836 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-26 18:26:29 -05:00
Bit
18fa5eef34 Add event for player editing sign (#9300)
Addresses https://github.com/PaperMC/Paper/issues/9293
2023-06-26 18:35:32 -04:00
Nassim Jahnke
279c17fcdf Iterate over entity array copy for entity scheduler 2023-06-26 18:41:08 +02:00
powercas_gamer
9696b46122 Fix ugly java logger format for paper plugin dependency loader (#9395) 2023-06-25 09:57:45 +02:00
Owen1212055
ec0be3fbf2 Fix cycle on paper plugin toString (#9392) 2023-06-24 17:37:38 -04:00
Owen1212055
08197c3a58 Fix interact event call override (#9387) 2023-06-23 12:03:43 -04:00
Molean
1ef0244836 Fix incorrect phantom spawning entity (#9385) 2023-06-23 18:50:29 +08:00
Samir
97487ac8bb ratelimited packet is logged to console on kick (#9292) 2023-06-21 09:36:14 -04:00
Redned
03bf77cebd 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 08:11:50 -05:00
Owen1212055
6a733d70c1 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
135469a842 Pull Folia API take two 2023-06-18 22:46:52 +02:00
Nassim Jahnke
8686a939f1 Revert "Move some Folia API to Paper for easy compat (#9360)"
This reverts commit e256eec4ef.
2023-06-18 21:47:17 +02:00
Nassim Jahnke
e256eec4ef Move some Folia API to Paper for easy compat (#9360) 2023-06-18 20:02:59 +02:00
Shane Freeder
7727050285 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
fb00916689 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:03:18 +02:00
Jake Potrebic
fb0fd871fe 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
efe626d498 Disable BukkitMirrorTest 2023-06-17 14:20:46 -07:00
Jake Potrebic
c975c477f7 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
aa6d576fe0 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
d555760ff6 Remove more outdated config settings (#9358) 2023-06-17 11:25:22 -07:00
Jake Potrebic
06ee6ab5d4 Remove stacktrace on exception from reading server.properties (#9296) 2023-06-16 19:27:45 -07:00
Spottedleaf
c0d376e242 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
Spottedleaf
cffc14631b Make sure to post process chunks before they are sent to players
Some TEs need to be post processed after generation to be sent
properly (chests)
2023-06-16 10:24:51 -07:00
Spottedleaf
3cfd74da9e Fix IntegerUtil#getDivisorNumbers
Use unsigned mod operation for initialization of anc

Also includes
- 5a0cefb45e
- acc8ed9634
2023-06-16 09:05:36 -07:00
powercas_gamer
2d788fba60 chore(api): add missing javadoc urls (#9355) 2023-06-16 17:34:49 +02:00
Ollie
f352774eef Update the server logo (#9264)
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2023-06-16 16:20:31 +01:00
Lulu13022002
0f4cd873af Fix sniffer removeExploredLocation and javadoc (#9311) 2023-06-16 15:33:25 +02:00
Nassim Jahnke
f0e193c3d1 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:
be1f3344 SPIGOT-7326: Add ClickType#isMouseClick()

CraftBukkit Changes:
3b557627c Fix Player#setScoreboard() checking incorrect state
9a21b0b89 SPIGOT-7393: Fix new tile entities not loading Bukkit's PersistentDataContainer

Spigot Changes:
c62f4bd9 Rebuild patches
2023-06-16 13:32:29 +02:00
Phillipp Glanz
4de304b9eb Don't enforce icanhasbukkit default if alias block exists (#9334) 2023-06-16 13:02:43 +02:00
Jake Potrebic
26d93fcec4 Fix incorrect annotation on BrushableBlock#getItem (#9345) 2023-06-16 03:58:09 -07:00
Jake Potrebic
557ea82bf6 Updated Upstream (Bukkit/CraftBukkit) (#9342)
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:
fdff0cd4 PR-869: Add Enderman#teleport and Enderman#teleportTowards
dfd86ee7 Improve sendSignChange and related documentation
beced2b2 PR-867: Add Player#sendBlockUpdate to send tile entity updates

CraftBukkit Changes:
ad6d0cffb SPIGOT-7394: Fix another issue with sendSignChange
66c5ce4c7 SPIGOT-7391: Preserve vanilla sign json where not modified by event
ae3824f94 PR-1204: Add Enderman#teleport and Enderman#teleportTowards
5863a2eae Fix sendSignChange not working
4a7eadc97 PR-1201: Add Player#sendBlockUpdate to send tile entity updates
789324e30 Work around issue placing decorated pots
2023-06-16 03:28:31 -07:00
Jason Penilla
3477dbf4aa Use ANSI serializer for console completion descriptions (#9351) 2023-06-15 10:11:09 -07:00
Jake Potrebic
8d5fa4f1ee Bump kyori's ansi to fix color bleed (#9346) 2023-06-15 09:24:01 -07:00
Jake Potrebic
56e39bc072 Re-add dropped patch during 1.20 update (#9344) 2023-06-14 17:52:28 -07:00
Bjarne Koll
529fb86efd Call BlockEntity#load in new child types (#9340)
BlockEntity#load is responsible for loading the pdc data for block
entities. Some of the new block entities added by mojang do not call
their super method, preventing paper from loading the PDC, which
leads to a loss of data.

This commit adds the super calls to prevent this.
2023-06-14 13:06:50 +02:00
powercas_gamer
01297f5079 [ci skip] mention adventure in chatcolor deprecation message (#9336)
* mention adventure in chatcolor deprecation message

* expand text

* americans
2023-06-14 05:48:41 +02:00
Jason Penilla
b40a6bb08b 1.20.1 (#9333) 2023-06-13 00:10:07 -07:00
Jake Potrebic
aa5e9d1d49 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9301) 2023-06-12 16:51:45 -07:00
Jason Penilla
b835c02322 Fix dev bundle generation 2023-06-12 16:44:07 -07:00
Emilia Kond
6925d11945 Use net.kyori.ansi for console logging (#9313)
Uses the new ANSIComponentSerializer introduced in Adventure 4.14.0 to
serialize components when logging them via the ComponentLogger, or when
sending messages to the console.

This replaces the old solution which uses legacy jank and custom color
conversions, with a new library that handles the conversion and config
2023-06-13 01:00:12 +03:00
Bjarne Koll
bc6e534738 Implement BossBarViewer on Player (#9332)
* Implement BossBarViewer on Player

Author: Riley Park <rileysebastianpark@gmail.com>

* Implement BossBar#viewers
2023-06-12 23:43:39 +02:00
Jake Potrebic
8df3a11758 fix incorrectly updated move vector checking patch (#9328) 2023-06-12 11:26:43 -07:00
Jake Potrebic
a7397ad665 Fix SmithingInventory helper slot methods for 1.20 (#9325) 2023-06-12 10:04:53 -07:00
Lulu13022002
04928c58a4 Fix EntityDeathEvent cancellation (#9323) 2023-06-12 19:03:51 +02:00
Bjarne Koll
1fcfe34f7f Fix sendSignChange0's usage of SignText (#9310) 2023-06-11 22:53:28 +02:00
Jake Potrebic
4e7f46f6c3 correctly hide players from entity argument suggestions (#9245) 2023-06-10 18:15:43 -07:00
Lulu13022002
8ee3c344d4 Add back the source uuid on exp orb for animals breeding (#9289) 2023-06-11 03:01:10 +02:00
Spottedleaf
f85410d12b Fix incorrect collision shape for hopper item suck
It shouldn't cost too much more to check the correct shape,
provided that it is cached and we use the overall AABB
to collect possible entities to check against.

The issues with the old check code is that it will use two
getEntitiesOfClass calls plus the addition of streams
_and_ the toAabbs() logic on VoxelShape. The new code
caches toAabbs, uses one getEntitiesOfClass call, and
does not use streams. Then compared to 1.12, we are
only performing two additional AABB checks per item.
2023-06-10 13:42:03 -07:00
Spottedleaf
3fe23c1679 Allow double removal from player chunk loader
Unlike Folia, players may be incorrectly be double-removed

Fixes https://github.com/PaperMC/Paper/issues/9299
2023-06-10 08:27:23 -07:00
Owen1212055
eb317edc8a Don't use event to get block position (#9295) 2023-06-10 02:13:42 -04:00
Jake Potrebic
120345dea6 Properly remove the experimental smithing inventory type (#9290) 2023-06-09 11:50:00 -07:00
Jake Potrebic
fd6fd80508 Add API for waxed signs (#9291) 2023-06-09 11:32:20 -07:00
Lulu13022002
8405a53d88 Add pitcher plant api (#9286) 2023-06-09 14:23:38 +02:00
Bjarne Koll
3553730d51 Minimise EntityFertilizeEggEvent and add sniffer (#9280) 2023-06-09 09:01:08 +02:00
Jake Potrebic
0bd83b4c4d fix missing trigger entity for xp orb from breeding 2023-06-08 23:52:18 -07:00
Jake Potrebic
6dfe9ac1d8 add side to PlayerSignCommandPreprocessEvent 2023-06-08 22:57:24 -07:00
Jake Potrebic
e450f54015 fix some more 1.20 tracking issues 2023-06-08 22:45:45 -07:00