Commit graph

2660 commits

Author SHA1 Message Date
Shane Freeder
5a66c3b64e Don't tick empty worlds (#9025) 2024-03-03 21:10:45 +00:00
Jake Potrebic
a2a55e2b27 Deprecate extra ban methods with raw BanEntry (#9580) 2024-03-03 12:54:52 -08:00
Gero
0c2d5b9b74 Configurable max block/fluid ticks (#10266) 2024-03-03 21:43:00 +01:00
Yannick Lamprecht
29009b5f04 improve BanList types (#10239) 2024-03-03 21:36:17 +01:00
Rodney
715e4018a4 Fire EntityDamageByEntityEvent for unowned wither skulls patch (#10244) 2024-03-03 20:35:50 +01:00
Yannick Lamprecht
bf8eb0f964 add rich message component support to configuration (#10225) 2024-03-03 19:59:22 +01:00
granny
db9d9c153d check if itemstack is stackable first (#10285) 2024-03-03 10:37:00 -08:00
Nassim Jahnke
1cfe913c93 Fix spawnreason saving 2024-02-23 23:13:37 +01:00
Bjarne Koll
b2aea18b19 Fix corrupted plugin.yml breaking plugin loading (#10279)
Fix corrupted plugin.yml file in one plugin not loading any plugins by
the server.

Co-authored-by: Aleksander Jagiello <themolkapl@gmail.com>
2024-02-23 18:54:44 +01:00
Shane Freeder
f8a84f01e2 Make debug mode print current configuration phase 2024-02-23 13:54:52 +00:00
Nassim Jahnke
1863ac217f Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10277)
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:
9a80d38c SPIGOT-336, SPIGOT-3366, SPIGOT-5768, SPIGOT-6409, SPIGOT-6861, PR-722: Add EntityRemoveEvent
258086d9 SPIGOT-7417, PR-967: Add Sign#getTargetSide and Sign#getAllowedEditor
ffaba051 SPIGOT-7584: Add missing Tag.ITEMS_NON_FLAMMABLE_WOOD

CraftBukkit Changes:
98b6c1ac7 SPIGOT-7589 Fix NullPointerException when bans expire
a2736ddb0 SPIGOT-336, SPIGOT-3366, SPIGOT-5768, SPIGOT-6409, SPIGOT-6861, PR-1008: Add EntityRemoveEvent
5bf12cb89 SPIGOT-7565: Throw a more descriptive error message when a developer tries to spawn an entity from a CraftBukkit class
76d95fe7e SPIGOT-7417, PR-1343: Add Sign#getTargetSide and Sign#getAllowedEditor

Spigot Changes:
e9ec5485 Rebuild patches
f1b62e0c Rebuild patches
2024-02-23 14:37:33 +01:00
Shane Freeder
e33fdd8189 Do not access world state to see if we can see a Player
Thrown into the adventure patch because I don't see the justification of a patch existing
for something like this.
2024-02-22 16:23:15 +00:00
Nassim Jahnke
bc49d1fd6c Add more ResourceLocation checks, some cleanup 2024-02-18 12:53:27 +01:00
Jason Penilla
14253bdf2c Run round-trip adventure codec tests with JSON, NBT, and Java ops. Use JavaOps for conversions. (#10031) 2024-02-17 14:58:56 -07:00
viciscat
c4731d1330 FluidState API (#9951)
* Add new FluidState API functionality
---------

Co-authored-by: Bjarne Koll <git@lynxplay.dev>
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2024-02-17 21:44:03 +01:00
David Mayr
2d6b2baf34 Scoreboard objective number format api (#10036)
* feat: number format api

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: make each individual score customizable

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* docs: fix incorrect descriptions

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: use access transformers

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: use adventure codecs

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* test: test for matching styles

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: convert number formats to interfaces

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: add style conversion to adventure patch

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: use paper adventure method in PaperScoreboardFormat

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* chore: rename methods to avoid a method in records

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* fix: check if objective is still registered

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: improve style conversion

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: modify how the getter behaves in score

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: use fluent naming

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* docs: add spaces before the paper comments

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* chore: styling changes

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* chore: make constant final

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: add methods for styled format instead of constants

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* fix: remove incorrect getTrackedPlayers check

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* docs: add . at the end of sentences

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* docs: explain null behaviour

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* docs: mention score creation

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* rebase and fix javadoc comments

* remove server implementation defaults

* fix format for PaperScoreboardFormat

---------

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-02-17 21:22:00 +01:00
Emilia Kond
c113eea77d [ci skip] Fix javadoc mistake in PluginMeta (#10258)
"Schematic versioning" is not a real thing. The intended versioning
scheme is "semantic versioning". Introduced in #8108.
2024-02-17 21:37:55 +02:00
leguan
060fd2cde7 [ci skip] Fix JavaDoc mistake in BlockPistonRetractEvent (#10250) 2024-02-17 20:15:15 +01:00
Jake Potrebic
1f16b25f9e Fire entity knockback event for ownerless tnt (#7171) 2024-02-16 15:44:43 -08:00
Shane Freeder
72004ecb99 Updated Upstream (Bukkit) (#10255)
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:
58ce1b0f Improve compatibility of new DamageSource API
2024-02-16 22:44:38 +00:00
Pedro
d884bac087 Fix BlockState being set to null for damage events (#10252) 2024-02-15 06:05:50 -03:00
Nassim Jahnke
41dcfd64b1 Updated Upstream (Bukkit/CraftBukkit) (#10242)
* 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:
a6a9d2a4 Remove some old ApiStatus.Experimental annotations
be72314c SPIGOT-7300, PR-829: Add new DamageSource API providing enhanced information about entity damage
b252cf05 SPIGOT-7576, PR-970: Add methods in MushroomCow to change stew effects
b1c689bd PR-902: Add Server#isLoggingIPs to get log-ips configuration
08f86d1c PR-971: Add Player methods for client-side potion effects
2e3024a9 PR-963: Add API for in-world structures
a23292a7 SPIGOT-7530, PR-948: Improve Resource Pack API with new 1.20.3 functionality
1851857b SPIGOT-3071, PR-969: Add entity spawn method with spawn reason
cde4c52a SPIGOT-5553, PR-964: Add EntityKnockbackEvent

CraftBukkit Changes:
38fd4bd50 Fix accidentally renamed internal damage method
80f0ce4be SPIGOT-7300, PR-1180: Add new DamageSource API providing enhanced information about entity damage
7e43f3b16 SPIGOT-7581: Fix typo in BlockMushroom
ea14b7d90 SPIGOT-7576, PR-1347: Add methods in MushroomCow to change stew effects
4c687f243 PR-1259: Add Server#isLoggingIPs to get log-ips configuration
22a541a29 Improve support for per-world game rules
cb7dccce2 PR-1348: Add Player methods for client-side potion effects
b8d6109f0 PR-1335: Add API for in-world structures
4398a1b5b SPIGOT-7577: Make CraftWindCharge#explode discard the entity
e74107678 Fix Crafter maximum stack size
0bb0f4f6a SPIGOT-7530, PR-1314: Improve Resource Pack API with new 1.20.3 functionality
4949f556d SPIGOT-3071, PR-1345: Add entity spawn method with spawn reason
20ac73ca2 PR-1353: Fix Structure#place not working as documented with 0 palette
3c1b77871 SPIGOT-6911, PR-1349: Change max book length in CraftMetaBook
333701839 SPIGOT-7572: Bee nests generated without bees
f48f4174c SPIGOT-5553, PR-1336: Add EntityKnockbackEvent
2024-02-11 22:28:00 +01:00
Warrior
0ec98e642c Add getChunkSnapshot includeLightData parameter (#10234) 2024-02-10 22:28:56 +01:00
Emilia Kond
1ba0d87cba Fire BlockPreDispenseEvent for droppers (#10226) 2024-02-10 23:19:22 +02:00
Jake Potrebic
e8e83aefff Properly track the changed item from dispense events (#8658) 2024-02-10 13:17:24 -08:00
Jake Potrebic
d767c37a54 Fix possible StackOverflowError for some dispenser iteractions (#8524) 2024-02-10 12:17:40 -08:00
Lulu13022002
9665ac3903 Fix WaterBottleSplashEvent not forwarding hit result (#10203) 2024-02-10 20:27:29 +01:00
Warrior
a863590fd5 Propagate failed to bind to port error (#10235) 2024-02-10 20:23:50 +01:00
Yannick Lamprecht
8129e8b3d5 itemstack expose tooltip lines (#10185)
* Itemstack Tooltip API

* re-order methods so advanced is first

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-02-10 02:12:50 +01:00
Lulu13022002
bda56c82ff Fix fox drops on death (#8862) 2024-02-10 01:07:10 +01:00
Tamion
8b0207ac93 Add Conduit API (#10195) 2024-02-09 23:03:27 +01:00
Micah Rao
dec84759dc Check for server JARs in plugin directory (#10228) 2024-02-09 16:05:13 -05:00
Tamion
03d5d38a6a Add Arrow/Stinger Removal Time API (#10193) 2024-02-09 21:56:13 +01:00
Moulberry
6591c39509 Fix NotNull locales (#10216)
Two methods returning locales are annotated @NotNull, despite being able
to return null
2024-02-10 04:30:50 +08:00
Jake Potrebic
4f9f09bb9b Lifecycle Event System (#9629)
* registering stuff event system

* simply by removing a ton of unneeded generics

* separate RegistryEvent and RegistrarEvent

* add logic for removing hooks when a plugin is disabled

* cleanup more

* swap around the way things are registered

* block further hook registrations for JavaPlugin

* Slightly more extensible to support registry mod API

* rename some types

* more moving/renaming

* remove 'hook' name

* Rename to 'lifecycle'

* move more impls for the server

* add priorities

* added lock for bootstrap event registration

* slight refactor to allow 'register anywhere' event types

* Move event type list to server impl

* use builder pattern to create event handler configurations

* add some more javadocs

* fix some issues, slight refactors

* call predicate and method renames

* add owner aware events

* rebased and refactored owner aware events

* add single helper method for registering simple handler

* compile fixes

* check owner and fix generics on register helper

* javadoc fixes and a few type renames

* more javadoc fixes

* move service loader file to correct location

* rename to Monitorable and Prioritizable

* add invalidation system for events after running them

* block reloading plugins in certain situations

* update test plugin

* remove dummy events

* rebase
2024-02-09 12:12:01 -08:00
Nassim Jahnke
679f34297e Improve tag parser handling, move hunks out of chunk system patch 2024-02-05 12:31:51 +01:00
Nassim Jahnke
f2da18d62e More provider source fixup 2024-02-02 12:44:09 +01:00
Nassim Jahnke
6fba18bac1 Add missing catch 2024-02-01 11:41:29 +01:00
Nassim Jahnke
e07a036b9f Fix sleeping pos desync 2024-02-01 10:53:15 +01:00
Nassim Jahnke
1cdeef88c5 Small refactor of Paper plugin context preparation 2024-02-01 10:51:29 +01:00
Lulu13022002
f7e469eb2e [ci skip] Cleanup events (#10202) 2024-02-01 10:15:57 +01:00
Rowan
d676979ea0 [ci skip] Fix incorrect documentation for BlockDropItemEvent (#10175)
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2024-01-27 20:42:46 +01:00
Jake Potrebic
cc0082f248 Properly check if a loot table exists (#10190) 2024-01-27 11:21:18 -08:00
Warrior
adf45d523a Disable memory reserve allocating (#10180) 2024-01-27 20:06:03 +01:00
Luis
dd9c9c8f6c Make spawn egg colours visible (#10158)
Co-authored-by: Yannick Lamprecht <1420893+yannicklamprecht@users.noreply.github.com>
2024-01-27 18:32:05 +00:00
Chase Henderson
c4aa25cd95 Shulker duplicate event (#10135) 2024-01-27 13:13:12 -05:00
Jake Potrebic
a86380bc18 [ci skip] clarify javadocs for Block#getDrops (#10153) 2024-01-27 09:35:09 -08:00
Nassim Jahnke
b63a0c5a8f Fix javadoc errors, remove unused classes 2024-01-26 21:34:40 +01:00
Nassim Jahnke
ad30e27e98 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:
1d522878 PR-966: Introduce getRespawnLocation as a replacement for getBedSpawnLocation
cc01b745 PR-965: Add DragonBattle#setPreviouslyKilled
28e3702f SPIGOT-6921, PR-957: Add methods to remove all enchantments on an ItemStack
8872404e PR-961: Add BlockData#copyTo
4054cc7b PR-956: Add method to get an offline player's location

CraftBukkit Changes:
292ec79e0 SPIGOT-7568: Call EntityChangeBlockEvent for DecoratedPot
b44bf5aa8 SPIGOT-7575: SuspiciousStewMeta creates invalid PotionEffect data
161784713 PR-1340: Centralize the conversion from and to Minecraft / Bukkit registry items even more and add a test case for them
b93c5a30d PR-1338: Introduce getRespawnLocation as a replacement for getBedSpawnLocation
fb973486c SPIGOT-7570: PrepareItemCraftEvent#isRepair() always returns false
c9c24535e PR-1337: Add DragonBattle#setPreviouslyKilled
c8b4da803 SPIGOT-6921, PR-1330: Add methods to remove all enchantments on an ItemStack
95bc1c4f5 PR-1333: Add BlockData#copyTo
36e2f9ce1 PR-1329: Add method to get an offline player's location

Spigot Changes:
c198da22 SPIGOT-7563: Update to latest release of bungeecord-chat
2024-01-26 20:17:06 +01:00
Nassim Jahnke
98775ea8e5 [ci skip] Fixup a few bad comments 2024-01-26 19:41:41 +01:00
Nassim Jahnke
d71804b7f8 Finish moving patches back and improving compilable state 2024-01-25 10:54:46 +01:00
Nassim Jahnke
52438f04a0 [ci skip] Move chunk system patch back 2024-01-24 22:13:08 +01:00
Shane Freeder
49feea0525 Convert average tick value in the GUI to the correct granularity 2024-01-24 16:27:32 +00:00
Nassim Jahnke
8dae5500dd [ci skip] Move chunk system patch a bit back 2024-01-24 15:57:53 +01:00
Nassim Jahnke
2a60c836aa [ci skip] Fixup last commit 2024-01-24 14:05:59 +01:00
Nassim Jahnke
fae4fc60c9 [ci skip] Move chunk system patch back a bit 2024-01-24 13:07:40 +01:00
Nassim Jahnke
24e3f94688 [ci skip] (Mostly) finish adding identifying patch comments 2024-01-24 11:45:17 +01:00
FireInstall
15288309a2 Expose LootTable of DecoratedPot (#10023) 2024-01-23 21:57:17 +01:00
Jake Potrebic
b9b956adb8 Add BlockStateMeta#clearBlockState (#10160) 2024-01-23 12:41:47 -08:00
1stGlitch
85453a2f60 Add world to Entity AddTo/RemoveFrom Events (#10183)
When a plugin listens to the EntityAddToWorld and EntityRemoveFromWorld events, I don't believe there is currently any method of directly obtaining which world the entity was actually added to/removed from. Using event.getEntity().getWorld() works in many cases, but not all. Specifically, when an entity is teleported from one world to another, the location of the entity is updated prior to the removal event being called. This means that when an entity goes through a nether/end portal or is teleported between worlds with a command, a plugin listening to the EntityRemoveFromWorldEvent has no way of determining which world the entity was actually removed from (without relying on other events).

To resolve this, I've added the world as a field in the events along with a getter to retrieve it. I also removed an unused import and made the documentation more clear on the event behaviour when chunks load/unload.
2024-01-23 15:17:14 -05:00
Nassim Jahnke
cd30cd6d41 Move diffs around to compile without later ones applied 2024-01-23 18:01:39 +01:00
Nassim Jahnke
091f54138b [ci skip] Move some disruptive patches back 2024-01-23 15:43:48 +01:00
Nassim Jahnke
88d3d87993 [ci skip] Add more patch identifying comments 2024-01-23 14:34:17 +01:00
Nassim Jahnke
e433c8696b [ci skip] Move some disruptive patches back 2024-01-23 12:06:27 +01:00
Nassim Jahnke
5dec86e71c [ci skip] Move some disruptive patches back 2024-01-22 21:04:08 +01:00
Nassim Jahnke
94e0370bed [ci skip] Add more patch identifying comments 2024-01-22 19:01:10 +01:00
Nassim Jahnke
2a2cdc2d1a [ci skip] Add more patch identifying comments 2024-01-22 18:04:55 +01:00
Nassim Jahnke
b088c37fc1 [ci skip] Add more patch identifying comments 2024-01-21 19:37:09 +01:00
Nassim Jahnke
bc99c40604 [ci skip] Add more patch identifying comments, cleanup 2024-01-21 17:39:05 +01:00
Nassim Jahnke
db4ed47134 [ci skip] Add more identifying patch comments 2024-01-21 13:56:22 +01:00
Nassim Jahnke
0571a6438e [ci skip] Add more identifying patch comments 2024-01-21 12:53:04 +01:00
Nassim Jahnke
f6609428b6 [ci skip] Add more identifying patch comments 2024-01-21 12:11:43 +01:00
Nassim Jahnke
dee90322eb [ci skip] Add more identifying patch comments 2024-01-20 23:13:41 +01:00
Shane Freeder
e34d100c9c Async world data IO saving (#10171)
Co-authored-by: Cryptite <cryptite@gmail.com>
2024-01-20 21:51:15 +00:00
Pantera (Mad_Daniel)
4112589be3 Add back Reduce allocation of Vec3D by entity tracker patch (#10179) 2024-01-21 02:26:51 +09:00
Nassim Jahnke
1b920c7241 [ci skip] Add more identifying patch comments 2024-01-20 12:50:16 +01:00
Lulu13022002
8b532bad3a Add visual blockdata api for primed tnt (#10146) 2024-01-20 00:01:12 +01:00
Nassim Jahnke
66431e1300 [ci skip] Add more identifying patch comments 2024-01-19 22:13:42 +01:00
Nassim Jahnke
3c246dc632 [ci skip] Add more identifying patch comments, merge related patches 2024-01-19 17:54:05 +01:00
Nassim Jahnke
64e5ff904c [ci skip] Add more identifying patch comments, merge related patches 2024-01-19 13:22:30 +01:00
Nassim Jahnke
b5b92e90d8 [ci skip] Add more identifying patch comments, merge related patches 2024-01-19 12:30:04 +01:00
Nassim Jahnke
864f4072c1 [ci skip] Add more identifying patch comments 2024-01-18 22:00:40 +01:00
Shane Freeder
0f611e7b4f Fix issue with kick event causes being passed improperly 2024-01-18 19:35:56 +00:00
Nassim Jahnke
ec3867cd12 [ci skip] Add more identifying patch comments 2024-01-18 18:52:00 +01:00
Nassim Jahnke
16f89b4fa7 [ci skip] Add more identifying patch comments 2024-01-18 15:56:25 +01:00
Nassim Jahnke
3a0aff9ba9 [ci skip] Minor cleanup and patch merges 2024-01-16 19:27:39 +01:00
Nassim Jahnke
22185798a5 [ci skip] Add more patch identifying comments 2024-01-16 12:41:40 +01:00
Owen1212055
73b42e843e Add mob goal generator (#9980) 2024-01-15 14:36:10 -05:00
Nassim Jahnke
64b98ef110 [ci skip] Add more patch identifying comments, merge related patches 2024-01-15 12:38:39 +01:00
Nassim Jahnke
44f3ecd436 [ci skip] Add more patch identifying comments, merge related patches 2024-01-14 16:31:39 +01:00
Nassim Jahnke
0cb53bb7af Readd missed line 2024-01-14 13:51:41 +01:00
Nassim Jahnke
b185870d79 Fixup AsyncPreLoginEvent patches
Fixes #10165
2024-01-14 13:33:47 +01:00
Jake Potrebic
fa7d1b668f Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10164)
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:
63c208dd Remove no longer used import
70be76c7 PR-958: Further clarify deprecation of TAG_CONTAINER_ARRAY
ae21f4ac PR-955: Add methods to place structures with block/entity transformers
e3d960f2 SPIGOT-7547: Remark that Damageable#setAbsorptionAmount() is capped to a specific value
b125516c Fix typo in RecipeChoice.ExactChoice docs
309497c1 Add EntityMountEvent and EntityDismount Event
2fd45ae3 Improve ItemFactory#enchantItem consistency
2b198268 PR-933: Define native persistent data types for lists

CraftBukkit Changes:
771182f70 PR-1327: Add methods to place structures with block/entity transformers
e41ad4c82 SPIGOT-7567: SpawnReason for SNOWMAN is reported as BUILD_IRONGOLEM
76931e8bd Add EntityMountEvent and EntityDismount Event
9b29b21c7 PR-1183: Better handle lambda expression and renaming of classes in Commodore
1462ebe85 Reformat Commodore.java
9fde4c037 PR-1324: Improve ItemFactory#enchantItem consistency
4e419c774 PR-1295: Define native persistent data types for lists
dd8cca388 SPIGOT-7562: Fix Score#getScore and Score#isScoreSet
690278200 Only fetch an online UUID in online mode
1da8d9a53 Fire PreLogin events even in offline mode
2e88514ad PR-1325: Use CraftBlockType and CraftItemType instead of CraftMagicNumbers to convert between minecraft and bukkit block / item representation

Spigot Changes:
864e4acc Restore accidentally removed package-info.java
f91a10d5 Remove obsolete EntityMountEvent and EntityDismountEvent
828f0593 SPIGOT-7558: Deprecate silenceable lightning API as sound is now client-side and cannot be removed
cdc4e035 Remove obsolete patch fetching correct mode UUIDs
49e36b8e Merge related BungeeCord patches
6e87b9ab Remove obsolete firing of PreLogin events in offline mode
5c76b183 Remove redundant patch dealing with exceptions in the crash reporter
3a2219d1 Remove redundant patch logging cause of unexpected exception
2024-01-14 01:46:04 -08:00
Jake Potrebic
a5eaf39caf [ci skip] add more comments & move 1 hunk to correct patch 2024-01-13 12:31:02 -08:00
Nassim Jahnke
393db207da [ci skip] Add more patch identifying comments 2024-01-13 18:34:33 +01:00
Nassim Jahnke
2307466a54 [ci skip] Add more patch identifying comments 2024-01-13 16:35:59 +01:00
Nassim Jahnke
0fb2a8eea3 Also check for the actual character length in ResourceLocation validation 2024-01-12 23:08:19 +01:00
Nassim Jahnke
12960f7064 [ci skip] Small cleanup to mc utils patch 2024-01-12 21:58:54 +01:00
Nassim Jahnke
af61e5fa1e Limit ResourceLocation length to nbt string tag length 2024-01-12 19:33:17 +01:00
Jake Potrebic
fcd5a14216 Use a ConcurrentHashMap for enum mappings for BlockData (#10161)
This API should be thread-safe as there is no world state
2024-01-12 08:25:12 -08:00
Jake Potrebic
acaa9f2d3f Log command execution exceptions if debug=true (#10130) 2024-01-11 08:15:17 -08:00
Nassim Jahnke
190d8a33b5 Fix tests by disabling them 2024-01-06 19:13:45 +01:00
Nassim Jahnke
b3fc9f7860 [ci skip] Fix typo 2024-01-06 15:11:45 +01:00
Nassim Jahnke
9ec827f55f Fixup NamespacedKey parsing 2024-01-06 15:07:59 +01:00
Nassim Jahnke
fdc2ea2808 Validate missed resource location parsing 2024-01-06 09:51:49 +01:00
Jake Potrebic
0797dd4643 Fix a borked update of 'Properly handle BlockBreakEvent#isDropItems' (#10134) 2024-01-05 01:07:43 -08:00
Warrior
bf4ab83226 Fix BlockDestroyEvents effectBlock not being set (#10131) 2024-01-05 01:09:04 +01:00
Jake Potrebic
4820459600 Fix EntityChangePoseEvent being called during worldgen (#10120) 2024-01-04 12:55:01 -08:00
Jake Potrebic
9bfe2bcce9 Fix cmd permission levels for command blocks (#7404) 2024-01-04 12:37:59 -08:00
Owen1212055
9940519717 Fix experience & improvements to block events (#8067)
This is a lot but basically adds a method to disable the dropping of experience and drops experience by default.
This way things that require XP to be dropped manually (via modification), they can drop XP themselves when needed but without touching anywhere else that may drop xp.

It should be noted this causes breakNaturally() to now drop experience.
2024-01-04 15:18:59 -05:00
Nassim Jahnke
635ece80cf [ci skip] Replace some magic values with constant references 2024-01-04 14:38:26 +01:00
Nassim Jahnke
0f3d126ce1 Validate ResourceLocation in NBT reading 2024-01-04 13:52:38 +01:00
Bjarne Koll
01a7a72224 Pass system properties to maven repo session (#10117)
The maven repository sessions used by the maven library loader requires
the java.version property to later evaluate the active profiles of
dependencies when downloading them during the plugin loader logic.

This commit fixes this by passing all system properties as a hopefully
future-proof way to provide the required data to said session.
2024-01-04 12:13:12 +01:00
Jake Potrebic
6c5ad653e5 Fix untrack event not being called for all 'untracks' (#10110) 2024-01-03 20:57:49 -08:00
Jake Potrebic
9f932e42bd include relative flags in PlayerTeleportEvent (#8190) 2024-01-02 11:42:26 -08:00
Owen1212055
524451e16c Keep fully frozen entities fully activated (#10103)
* Keep fully frozen entities fully activated

* Rebase and switch to isFreezing

---------

Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2024-01-02 14:08:34 -05:00
Jake Potrebic
324d220679 fix CustomModelData being removed (#10113) 2024-01-02 10:51:09 -08:00
Jake Potrebic
8f3f70d786 Call EntityChangeBlockEvent for cake eating (#10105) 2024-01-02 10:45:36 -08:00
Jake Potrebic
60beb05297 [ci skip] Remove extraneous diff added in 1.20.3 update (#10101) 2024-01-02 10:29:53 -08:00
Jake Potrebic
e9e8abc91d Correctly check if bucket dispenses will succeed for event (#10109) 2024-01-02 09:14:42 -08:00
Spottedleaf
7db3355205 Make region/lock shift accessors per world
This has been done to ensure that the shifts are not used
until the world object is being constructed, which is before
the global configuration is initialised. There also isn't any
reason for these shifts to be global anyways.
2023-12-30 15:45:24 -08:00
Jake Potrebic
ee6a9c50d8 cleanup player death event adventure logic (#10095)
There was a TODO left there regarding the translated death
message being used by plugins to identify the cause of death. This
should be mitigated now because the LegacyComponentSerializer default
implemenation uses our custom flattener which renders vanilla
translatable components to their English representation.
2023-12-29 12:28:58 -08:00
Jake Potrebic
e1faa8e814 Call entity_die game event after event cancel check (#10096) 2023-12-29 11:57:32 -08:00
caramel
c4e0d81696 Fix some component bugs in login disconnect packet (#10090) 2023-12-30 04:51:52 +09:00
caramel
09ae4f6257 Fix Folia scheduler tasks not canceling when plugin disable (#10091) 2023-12-29 09:59:19 +09:00
Jake Potrebic
0c4e87fd28 Properly disallow async Player#chat (#8123)
Clarify asynchronous status of AsyncChatEvent
2023-12-28 16:50:06 -08:00
Tamion
359ddffcf1 Add HiddenPotionEffect API (#9910) 2023-12-29 01:38:44 +01:00
Cryptite
9e56826f66 Add PlayerShieldDisableEvent (#9177) 2023-12-28 18:27:34 -06:00
Jake Potrebic
e7beaa38ba Add drops to shear events (#5678) 2023-12-28 14:41:07 -08:00
Jake Potrebic
cca94c1a21 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10085)
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:
0c7aedbc SPIGOT-7554, PR-954: Add DecoratedPotInventory

CraftBukkit Changes:
53ebb05e3 SPIGOT-7554, PR-1323: Add DecoratedPotInventory
33a2d8773 Ensure that PlayerMoveEvent is always fired where applicable
7df18510f SPIGOT-7555: Don't cast ItemFlags to byte
19aec59ea Use provided case for non-existent OfflinePlayers

Spigot Changes:
e7ce55a3 Remove obsolete PlayerMoveEvent improvements
3e5e22c0 Remove obsolete lowercasing of non existent OfflinePlayer names
2023-12-28 12:47:57 -08:00
Jake Potrebic
4d050226c3 Fix global sound event gamerule not being respected (#8727) 2023-12-27 16:33:05 -08:00
Md5Lukas
396b05ada6 Add experience points api (#9688) 2023-12-28 00:49:45 +01:00
Alex
db6b5b45ff Fix long loading screen when refreshing skins (#10026)
Send `ClientboundGameEventPacket.LEVEL_CHUNKS_LOAD_START` when refreshing players after
player profile changes.
2023-12-28 00:22:44 +01:00
Jake Potrebic
5e518056e2 Fix campfire recipes not always outputting full result (#8754) 2023-12-27 15:02:49 -08:00
Jake Potrebic
addfcd57a1 Don't fire 2 game events for certain cauldron interactions (#8904) 2023-12-27 14:32:39 -08:00
Jake Potrebic
2461bcfe65 Fix command block async message (again) (#10082) 2023-12-27 01:30:15 -08:00
Owen1212055
fab261ae0b Catch async usage of playsound (#10021) 2023-12-26 15:00:21 -05:00
Jake Potrebic
7ecbd18f48 fix NPE on EntityTeleportEvent getTo (#10016) 2023-12-26 11:22:41 -08:00
Warrior
dce06a986f Keep newlines in outdated client/server message (#10042) 2023-12-26 20:02:22 +01:00
Jake Potrebic
3786f007a3 [ci skip] cleanup patch diff from last commit 2023-12-25 16:47:06 -08:00
Nassim Jahnke
a8c7bd8740 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:
cc9aa21a SPIGOT-6399, SPIGOT-7344: Clarify collidable behavior for player entities
f23325b6 Add API for per-world simulation distances
26e1774e Add API for per-world view distances
0b541e60 Add PlayerLoginEvent#getRealAddress
5f027d2d PR-949: Add Vector#fromJOML() overloads for read-only vector types

CraftBukkit Changes:
bcf56171a PR-1321: Clean up some stuff which got missed during previous PRs
7f833a2d1 SPIGOT-7462: Players no longer drop XP after dying near a Sculk Catalyst
752aac669 Implement APIs for per world view and simulation distances
57d7ef433 Preserve empty enchantment tags for glow effect
465ec3fb4 Remove connected check on setScoreboard
f90ce621e Use one PermissibleBase for all command blocks
5876cca44 SPIGOT-7550: Fix creation of Arrow instances
f03fc3aa3 SPIGOT-7549: ServerTickManager#setTickRate incorrect Precondition
9d7f49b01 SPIGOT-7548: Fix wrong spawn location for experience orb and dropped item

Spigot Changes:
ed9ba9a4 Drop no longer required patch ignoring -o option
86b5dd6a SPIGOT-7546: Fix hardcoded check for outdated client message
aa7cde7a Remove obsolete APIs for per world view and simulation distances
6dff577e Remove obsolete patch preserving empty `ench` tags
a3bf95b8 Remove obsolete PlayerLoginEvent#getRealAddress
1b02f5d6 Remove obsolete connected check on setScoreboard patch
acf717eb Remove obsolete command block PermissibleBase patch
053fa2a9 Remove redundant patch dealing with null tile entities
2023-12-25 23:51:56 +01:00
EpicPlayerA10
87c2eac1d8 Increase default custom payload channel size limit (#10006) 2023-12-25 12:01:18 +01:00
Jake Potrebic
cdcf832673 Update to adventure 4.15 (#10045) 2023-12-25 02:51:44 -08:00
Jake Potrebic
50364f320c Add Registry#getKey (#10066)
Some types that have registries support existing without
being in a registry and therefore have no key. This is part
one of supporting that, adding a Registry#getKey(Object) method
to be able to get the key for an object so we can remove Keyed
from such objects.

This also deprecates Keyed#getKey on TrimMaterial and TrimPattern
as these are the 2 offending types currently in the api.
2023-12-23 13:16:27 -08:00
Jake Potrebic
0c9b5e23ab Fix and add new scoreboard API (#10037) 2023-12-23 11:53:07 -08:00
Jake Potrebic
e93ec8f95d Remove 'fix Vanilla Minecart speed' patch (#10068)
The game uses 0.95d now
2023-12-22 17:44:36 -08:00
Jake Potrebic
0ff8861f60 add missing Experimental annotations (#10012) 2023-12-21 13:13:05 -08:00
Jake Potrebic
5ba15732d7 Remove duplicate code in chunk tick iteration (#10056) 2023-12-21 09:15:00 -08:00
Jake Potrebic
9ac075e78e Use correct max stack size in crafter (#10057) 2023-12-21 09:10:28 -08:00
Lulu13022002
bdae546a5e Fix world border edge collision (#10053)
The collision shape of the border is determined by flooring the min values and ceiling the max values, so the isCollidingWithBorder() function should mirror such behavior.
2023-12-20 06:31:07 +01:00
Jake Potrebic
0f74988507 properly read and store sus effect duration (#10050) 2023-12-19 13:31:49 -08:00
Jake Potrebic
516942a4d5 Don't fire the drop event on player deaths (#10046) 2023-12-18 20:57:49 -08:00
Spottedleaf
abff96ed8d Make worldborder collisions consistent with Vanilla
Vanilla now requires the use of WorldBorder#isInsideCloseToBorder
to consider a border collision
2023-12-18 17:12:55 -08:00
Jake Potrebic
b66d200b4b hotfix spawning item/xp in wrong spot 2023-12-17 20:23:39 -08:00
Jake Potrebic
5497c308d9 send sound and particle packets immediately even if off main (#10033) 2023-12-17 11:39:40 -08:00
Jake Potrebic
6f7ee18a4c Updated Upstream (Bukkit/CraftBukkit) (#10034)
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:
f29cb801 Separate checkstyle-suppressions file is not required
86f99bbe SPIGOT-7540, PR-946: Add ServerTickManager API
d4119585 SPIGOT-6903, PR-945: Add BlockData#getMapColor
b7a2ed41 SPIGOT-7530, PR-947: Add Player#removeResourcePack
9dd56255 SPIGOT-7527, PR-944: Add WindCharge#explode()
994a6163 Attempt upgrade of resolver libraries

CraftBukkit Changes:
b3b43a6ad Add Checkstyle check for unused imports
13fb3358e SPIGOT-7544: Scoreboard#getEntries() doesn't get entries but class names
3dda99c06 SPIGOT-7540, PR-1312: Add ServerTickManager API
2ab4508c0 SPIGOT-6903, PR-1311: Add BlockData#getMapColor
1dbdbbed4 PR-1238: Remove unnecessary sign ticking
659728d2a MC-264285, SPIGOT-7439, PR-1237: Fix unbreakable flint and steel is completely consumed while igniting creeper
e37e29ce0 Increase outdated build delay
c00438b39 SPIGOT-7530, PR-1313: Add Player#removeResourcePack
492dd80ce SPIGOT-7527, PR-1310: Add WindCharge#explode()
e11fbb9d7 Upgrade MySQL driver
9f3a0bd2a Attempt upgrade of resolver libraries
60d16d7ca PR-1306: Centralize Bukkit and Minecraft entity conversion

Spigot Changes:
06d602e7 Rebuild patches
2023-12-16 18:09:28 -08:00
Spottedleaf
d597c4927a Fix incorrect border collision detection
The epsilon used was in the opposite direction, which would cause
the getCollisions method to incorrectly return it for when players
were exactly on the border but not colliding. To bring it in-line
with the rest of the collision code, the collision must be into
the border by +EPSILON.

Fixes https://github.com/PaperMC/Paper/issues/9859
2023-12-14 18:57:17 -08:00
Jason Penilla
342ba71d4c Remove no longer needed diff from adventure patch 2023-12-12 13:44:09 -08:00
booky10
480f2aab54 Fix vanilla components not being translated (#9893)
* Fix vanilla components not being translated

* Add nullability check, simplify adventure component encoding

Changes suggested by @jpenilla
2023-12-12 22:40:33 +01:00
Jason Penilla
ebf7955996 [ci skip] move decomp fixes to correct patch 2023-12-11 22:08:51 -08:00
Jake Potrebic
6e3d7add28 Use Codecs for adventure Component conversions & network serialization (#10014)
* finish implementing all adventure components in codecs

* add some initial tests

* Add round trip tests for text and translatable components

* Add more round trip test data (score component is failing)

* Add more round trip test data

* Fix SCORE_COMPONENT_MAP_CODEC

* Improve test failure messages

* Add failure cases

* Add a couple more test data

* Make use of AdventureCodecs

* Update patches after rebase

* Squash changes into adventure patch

* Fix AT formatting

* update comment

---------

Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2023-12-11 22:02:06 -08:00
Jason Penilla
4580d97f5e Fix deprecated bungee APIs still serializing to JSON in packets (#10028) 2023-12-11 20:24:48 -08:00
Owen1212055
a52612213b Catch setEnabled to ensure classloader is properly unloaded (#10020) 2023-12-10 20:02:26 -05:00
Jake Potrebic
a3a40ecd2b fix NPE when iterating over default drops (#10017) 2023-12-10 10:33:36 -08:00
Jake Potrebic
5954b852d8 Update key gen for 1.20.4 (#10015) 2023-12-10 10:25:01 -08:00
Jake Potrebic
4d968b5fe5 Update and clean up api dependencies (#10018) 2023-12-10 10:04:19 -08:00
caramel
3a2229c5f3 Fix PlayerInteractEvent#getClickedBlock() returning wrong block in adventure mode (#10019) 2023-12-10 19:02:24 +09:00
Nassim Jahnke
a889754d39 Use uuid param in setResourcePack 2023-12-09 13:53:08 +01:00
Jake Potrebic
b86d22ac6c more work on adventure codecs 2023-12-08 21:48:02 -08:00
Jake Potrebic
5db582ae19 remove redundant patch 2023-12-08 15:14:42 -08:00
Jake Potrebic
93dcf918f8 more cleanup and resource pack api fixes 2023-12-08 15:13:02 -08:00
Jake Potrebic
b21ac86cac fixup tests and add missing API detected by those tests 2023-12-08 12:07:56 -08:00
Lulu13022002
4fc499dde8 optimise explosion damage further
and use the right entity for the dragon part damage
2023-12-08 20:47:27 +01:00
Jake Potrebic
40d0f2da71 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:
01bb6ba7 PR-936: Add new PersistentDataContainer methods and clean up docs
bc145b90 PR-940: Create registry for banner pattern and cat type

CraftBukkit Changes:
cb2ea54de SPIGOT-7440, PR-1292: Fire EntityTeleportEvent for end gateways
4fea66e44 PR-1299: Add new PersistentDataContainer methods and clean up docs
b483a20db PR-1303: Create registry for banner pattern and cat type
4642dd526 SPIGOT-7535: Fix maps not having an ID and also call MapInitializeEvent in more places
2023-12-08 11:00:39 -08:00
Owen1212055
03cf27d8f0 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:
cdfe62e4 Update to Minecraft 1.20.4

CraftBukkit Changes:
51eea725f Update to Minecraft 1.20.4

Spigot Changes:
ce0f71e4 Update to Minecraft 1.20.4
2023-12-07 15:14:35 -05:00
Jake Potrebic
a47c19cb77 more adventure codec stuff
and fix tests
2023-12-07 11:14:29 -08:00
Noah van der Aa
dc0fed044e Updated Upstream (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

CraftBukkit Changes:
c9cb08551 SPIGOT-7536: Using Crafter crashes server
2023-12-07 13:03:14 +01:00
Jake Potrebic
fc6af9c088 cleanup Optimize MappedRegistry patch 2023-12-06 22:41:13 -08:00
Jason Penilla
f53cff02ff Update adventure 2023-12-06 21:04:46 -07:00
Owen1212055
1e5f347169 Clean up username validation logic 2023-12-06 20:26:58 -05:00
Owen1212055
bd76143a5a Hotfix DefaultDispenseItemBehavior#spawnItem 2023-12-06 19:45:28 -05:00
Nassim Jahnke
7bd24cf0a9 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:
9a294519 SPIGOT-7533, 943: Add missing Poses for 1.20.3
be2884c4 Add unique ID to PlayerResourcePackStatusEvent
d9c1eb83 Add additional @MinecraftExperimental annotations
68f5bb6a SPIGOT-7526: Add missing PlayerResourcePackStatusEvent statuses

CraftBukkit Changes:
368c48be1 Fix formatting issue in previous commit
da8f91f31 SPIGOT-7534: Error when chunk with decorated pot trying to save
d20c9291a SPIGOT-7532: Entity#isValid() returns false after server restart
ec1fa2ead PR-1309: Add tests for Bukkit Pose
5a7080b58 Add unique ID to PlayerResourcePackStatusEvent
0fd734950 SPIGOT-7528: Fix certain custom shaped recipes
2023-12-06 22:59:39 +01:00
Nassim Jahnke
866d36c9ad Update cb package version 2023-12-06 22:51:50 +01:00
Nassim Jahnke
7d6c55f960 Fix timings check with tick freezes 2023-12-06 22:40:08 +01:00
Nassim Jahnke
80729ab0fd Inline imports in loottable patch 2023-12-06 22:22:22 +01:00
Nassim Jahnke
bee1482bcb Fix lootable patch, cb crash due to unimplemented methods 2023-12-06 22:17:56 +01:00
Jason Penilla
812519d14f Temp adventure update 2023-12-06 13:45:12 -07:00
Nassim Jahnke
29018cf64c Make it compile again 2023-12-06 21:28:59 +01:00
Nassim Jahnke
9b067d69a1 Fixup 2023-12-06 21:14:54 +01:00
Owen1212055
ab5d5fb554 Fix some missing diffs 2023-12-06 15:11:00 -05:00
Owen1212055
8e37c573ec Remove some patches 2023-12-06 15:09:14 -05:00
Nassim Jahnke
d0a41fbabf Add missing timings stop 2023-12-06 21:04:01 +01:00
Nassim Jahnke
7bd0fbea6c Drop old packs in setResourcePack 2023-12-06 20:46:49 +01:00
Nassim Jahnke
42a06e89bb It compiles 2023-12-06 20:40:37 +01:00
Nassim Jahnke
b7ab883a24 More compile fixes 2023-12-06 20:10:59 +01:00
Jake Potrebic
916f988912 more compile fixes 2023-12-06 10:36:49 -08:00
Lulu13022002
fc727a05cd remove old diff 2023-12-06 19:26:53 +01:00
Noah van der Aa
9734050cf0 More compile fixes 2023-12-06 19:21:23 +01:00
Nassim Jahnke
4ce929d6da Apply all patches 2023-12-06 19:18:53 +01:00
Jake Potrebic
286f49b866 fix more compile issues 2023-12-06 10:07:47 -08:00