Commit graph

2757 Commits

Autor SHA1 Nachricht Datum
Nassim Jahnke
8c8862f3a8
Also check for the actual character length in ResourceLocation validation 2024-01-12 23:33:43 +01:00
Nassim Jahnke
a0ffb57745
[ci skip] Small cleanup to mc utils patch 2024-01-12 21:58:54 +01:00
Nassim Jahnke
f28caff927
Limit ResourceLocation length to nbt string tag length 2024-01-12 19:33:17 +01:00
Jake Potrebic
ec196207c2
Use a ConcurrentHashMap for enum mappings for BlockData (#10161)
This API should be thread-safe as there is no world state
2024-01-12 16:25:12 +00:00
Jake Potrebic
a80d31b1bd
Log command execution exceptions if debug=true (#10130) 2024-01-11 08:15:17 -08:00
Nassim Jahnke
07b956e3a3
Fix tests by disabling them 2024-01-06 19:13:45 +01:00
Nassim Jahnke
f1c5f0198c
[ci skip] Fix typo 2024-01-06 15:11:45 +01:00
Nassim Jahnke
e46276eb71
Fixup NamespacedKey parsing 2024-01-06 15:07:59 +01:00
Nassim Jahnke
570cfb44d6
Validate missed resource location parsing 2024-01-06 09:51:49 +01:00
Jake Potrebic
a58e29db99
Fix a borked update of 'Properly handle BlockBreakEvent#isDropItems' (#10134) 2024-01-05 10:07:43 +01:00
Warrior
25a99b12e8
Fix BlockDestroyEvents effectBlock not being set (#10131) 2024-01-05 01:09:04 +01:00
Jake Potrebic
a93acc4275
Fix EntityChangePoseEvent being called during worldgen (#10120) 2024-01-04 12:55:01 -08:00
Jake Potrebic
8379027ee0
Fix cmd permission levels for command blocks (#7404) 2024-01-04 12:37:59 -08:00
Owen
19a620213f
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
7eaff48d7c
[ci skip] Replace some magic values with constant references 2024-01-04 14:38:26 +01:00
Nassim Jahnke
b2a6d575dd
Validate ResourceLocation in NBT reading 2024-01-04 13:55:17 +01:00
Bjarne Koll
259bc76026
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 11:13:12 +00:00
Jake Potrebic
ae001ae6ee
Fix untrack event not being called for all 'untracks' (#10110) 2024-01-03 20:57:49 -08:00
Jake Potrebic
1fa48d140c
include relative flags in PlayerTeleportEvent (#8190) 2024-01-02 20:42:26 +01:00
Owen
509876d26f
Keep fully frozen entities fully activated (#10103)
* Keep fully frozen entities fully activated

* Rebase and switch to isFreezing

---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-01-02 11:08:34 -08:00
Jake Potrebic
692db0c81d
fix CustomModelData being removed (#10113) 2024-01-02 19:51:09 +01:00
Jake Potrebic
816bacc2c3
Call EntityChangeBlockEvent for cake eating (#10105) 2024-01-02 19:45:36 +01:00
Jake Potrebic
58e120b77c
[ci skip] Remove extraneous diff added in 1.20.3 update (#10101) 2024-01-02 10:29:53 -08:00
Jake Potrebic
983377b55a
Correctly check if bucket dispenses will succeed for event (#10109) 2024-01-02 09:14:42 -08:00
Spottedleaf
1281f4f552 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
0ae58c09a1
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
3484ae987a
Call entity_die game event after event cancel check (#10096) 2023-12-29 11:57:32 -08:00
caramel
e56e53f83a
Fix some component bugs in login disconnect packet (#10090) 2023-12-29 20:51:52 +01:00
caramel
5e978d3a3d
Fix Folia scheduler tasks not canceling when plugin disable (#10091) 2023-12-29 01:59:19 +01:00
Jake Potrebic
e4ab50de34
Properly disallow async Player#chat (#8123)
Clarify asynchronous status of AsyncChatEvent
2023-12-28 16:50:06 -08:00
Tamion
2951732742
Add HiddenPotionEffect API (#9910) 2023-12-28 19:38:44 -05:00
Cryptite
b2ffb1b02d
Add PlayerShieldDisableEvent (#9177) 2023-12-29 01:27:34 +01:00
Jake Potrebic
2c3ccb80f0
Add drops to shear events (#5678) 2023-12-28 14:41:07 -08:00
Jake Potrebic
3c0d6aaed9
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
8221b085f9
Fix global sound event gamerule not being respected (#8727) 2023-12-27 16:33:05 -08:00
Md5Lukas
c081104395
Add experience points api (#9688) 2023-12-28 00:49:45 +01:00
Alex
88d28d6bdd
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
a401585cfa
Fix campfire recipes not always outputting full result (#8754) 2023-12-27 15:02:49 -08:00
Jake Potrebic
d1f507fc0e
Don't fire 2 game events for certain cauldron interactions (#8904) 2023-12-27 14:32:39 -08:00
Jake Potrebic
0d6a0c3b28
Fix command block async message (again) (#10082) 2023-12-27 10:30:15 +01:00
Owen
dc621507f5
Catch async usage of playsound (#10021) 2023-12-26 15:00:21 -05:00
Jake Potrebic
f483b38596
fix NPE on EntityTeleportEvent getTo (#10016) 2023-12-26 11:22:41 -08:00
Warrior
4fdda9e583
Keep newlines in outdated client/server message (#10042) 2023-12-26 14:02:22 -05:00
Jake Potrebic
c215ce1858
[ci skip] cleanup patch diff from last commit 2023-12-25 16:47:06 -08:00
Nassim Jahnke
e035fd7034
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-26 00:18:13 +01:00
EpicPlayerA10
ff7b9b0380
Increase default custom payload channel size limit (#10006) 2023-12-25 12:01:18 +01:00
Jake Potrebic
4adca3d7a3
Update to adventure 4.15 (#10045) 2023-12-25 11:51:44 +01:00
Jake Potrebic
49f9f6f2cd
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
e7e1c8a832
Fix and add new scoreboard API (#10037) 2023-12-23 11:53:07 -08:00
Jake Potrebic
1e7dd72f15
Remove 'fix Vanilla Minecart speed' patch (#10068)
The game uses 0.95d now
2023-12-22 17:44:36 -08:00
Jake Potrebic
b4c9e7e5d4
add missing Experimental annotations (#10012) 2023-12-21 13:13:05 -08:00
Jake Potrebic
d11a58802a
Remove duplicate code in chunk tick iteration (#10056) 2023-12-21 09:15:00 -08:00
Jake Potrebic
45e01a2a78
Use correct max stack size in crafter (#10057) 2023-12-21 09:10:28 -08:00
Lulu13022002
086ca616d8
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-19 21:31:07 -08:00
Jake Potrebic
8c007d90a5
properly read and store sus effect duration (#10050) 2023-12-19 13:31:49 -08:00
Jake Potrebic
47b2c186d7
Don't fire the drop event on player deaths (#10046) 2023-12-18 20:57:49 -08:00
Spottedleaf
0b952981e6 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
e3140fb70e
hotfix spawning item/xp in wrong spot 2023-12-17 20:23:39 -08:00
Jake Potrebic
ff26d54ee0
send sound and particle packets immediately even if off main (#10033) 2023-12-17 11:39:40 -08:00
Jake Potrebic
de04cbced5
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
f1820dc80a 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
7e15d977ec
Remove no longer needed diff from adventure patch 2023-12-12 13:44:09 -08:00
booky10
dc3ef2ae0f
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 13:40:33 -08:00
Jason Penilla
0fadaed078
[ci skip] move decomp fixes to correct patch 2023-12-11 22:08:51 -08:00
Jake Potrebic
7c2dc4b342
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
82f9280ae4
Fix deprecated bungee APIs still serializing to JSON in packets (#10028) 2023-12-11 20:24:48 -08:00
Owen
28abbaa7bd
Catch setEnabled to ensure classloader is properly unloaded (#10020) 2023-12-10 20:02:26 -05:00
Jake Potrebic
dd16335e40
fix NPE when iterating over default drops (#10017) 2023-12-10 10:33:36 -08:00
Jake Potrebic
3434a6fc66
Update key gen for 1.20.4 (#10015) 2023-12-10 10:25:01 -08:00
Jake Potrebic
166761f29f
Update and clean up api dependencies (#10018) 2023-12-10 10:04:19 -08:00
caramel
bcbe5dcd78
Fix PlayerInteractEvent#getClickedBlock() returning wrong block in adventure mode (#10019) 2023-12-10 11:02:24 +01:00
Nassim Jahnke
b42a1da873
Use uuid param in setResourcePack 2023-12-09 13:53:08 +01:00
Jake Potrebic
abfb6b219b
more work on adventure codecs 2023-12-08 21:48:02 -08:00
Jake Potrebic
9051fc347c
remove redundant patch 2023-12-08 15:14:42 -08:00
Jake Potrebic
f17622cc3d
more cleanup and resource pack api fixes 2023-12-08 15:13:02 -08:00
Jake Potrebic
7606e6da39
fixup tests and add missing API detected by those tests 2023-12-08 12:07:56 -08:00
Lulu13022002
8d8eb3bdf6
optimise explosion damage further
and use the right entity for the dragon part damage
2023-12-08 20:47:27 +01:00
Jake Potrebic
2f92d4e00e
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
Jason Penilla
930a24f965
1.20.4 2023-12-07 13:27:28 -07:00
Owen1212055
ff72782888
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:15:25 -05:00
Jake Potrebic
d0476837a5
more adventure codec stuff
and fix tests
2023-12-07 11:14:29 -08:00
Noah van der Aa
9223f05a40
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
6577db6dd6
cleanup Optimize MappedRegistry patch 2023-12-06 22:41:13 -08:00
Jason Penilla
6c4c13df44
Update adventure 2023-12-06 21:24:16 -07:00
Owen1212055
9227a9648c
Clean up username validation logic 2023-12-06 20:26:58 -05:00
Owen1212055
b277feb448
Hotfix DefaultDispenseItemBehavior#spawnItem 2023-12-06 19:45:28 -05:00
Nassim Jahnke
6bafacfb14 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 23:01:51 +01:00
Nassim Jahnke
b1f94a84e8 Update cb package version 2023-12-06 22:51:50 +01:00
Nassim Jahnke
772d430cd1 Fix timings check with tick freezes 2023-12-06 22:40:08 +01:00
Nassim Jahnke
896e29bba7 Inline imports in loottable patch 2023-12-06 22:22:22 +01:00
Nassim Jahnke
d1dbe0020d Fix lootable patch, cb crash due to unimplemented methods 2023-12-06 22:17:56 +01:00
Jason Penilla
0addaa1cf2
Temp adventure update 2023-12-06 13:53:16 -07:00
Nassim Jahnke
c833571526 Make it compile again 2023-12-06 21:28:59 +01:00
Owen1212055
a2b6275487
Add missing removed patches 2023-12-06 13:26:04 -07:00
Nassim Jahnke
9bc67abccf Fixup 2023-12-06 21:19:37 +01:00
Owen1212055
ff2946e04b
Fix some missing diffs 2023-12-06 15:11:00 -05:00
Owen1212055
d3f1bc04b4
Remove some patches 2023-12-06 15:09:14 -05:00
Nassim Jahnke
b32a34c71d Add missing timings stop 2023-12-06 21:04:01 +01:00
Nassim Jahnke
03541446b2 Drop old packs in setResourcePack 2023-12-06 20:46:49 +01:00
Nassim Jahnke
c2b70338fc It compiles 2023-12-06 20:40:37 +01:00
Nassim Jahnke
1d028f3853 More compile fixes 2023-12-06 20:10:59 +01:00
Jake Potrebic
deb02722b2
more compile fixes 2023-12-06 10:36:49 -08:00
Lulu13022002
6b272a65e7
remove old diff 2023-12-06 19:29:36 +01:00
Noah van der Aa
5999d669ac
More compile fixes 2023-12-06 19:21:41 +01:00
Nassim Jahnke
b8f9558745 Apply all patches 2023-12-06 19:19:19 +01:00
Jake Potrebic
a364b7e88b
fix more compile issues 2023-12-06 10:07:47 -08:00
Jake Potrebic
0dee538a62
Upstream blocked Player#remove so our patch needed to be refactored 2023-12-06 09:54:52 -08:00
Jake Potrebic
6c4efc92be
fix mismatched bracket in game packet listener 2023-12-06 09:47:45 -08:00
Bjarne Koll
13b92ad487
Make things explodes via patches 2023-12-06 18:33:52 +01:00
Bjarne Koll
855a8196cf
Fix custom potion mixes patch 2023-12-06 17:40:36 +01:00
Owen1212055
9546b9c587
Patches!!! MORE MORE MORE MOOOOORE 2023-12-06 11:34:54 -05:00
Owen1212055
cd61b5d98e
Patches!!! MORE 2023-12-06 11:21:56 -05:00
Owen1212055
6bf2ebf200
Patches!!! (2) 2023-12-06 11:00:26 -05:00
Owen1212055
25dc4afafa
Patches!!! 2023-12-06 10:17:00 -05:00
Jake Potrebic
cc78c7f5f5
fix serializing TextColor with name 2023-12-05 20:56:02 -08:00
Jason Penilla
29e137669e
p a t c h e s 2023-12-05 21:49:31 -07:00
Jason Penilla
2053d6ace7
Improve update helper task 2023-12-05 21:46:41 -07:00
Jason Penilla
fc12258f24
more patch 2023-12-05 20:57:46 -07:00
Jason Penilla
723c05e7fe
some patches :D 2023-12-05 20:34:04 -07:00
Jason Penilla
5513f8a795
patches ... 2023-12-05 20:00:14 -07:00
Jake Potrebic
ad99d4568b
initial work on native Adventure codecs 2023-12-05 16:49:11 -08:00
Jason Penilla
6e9a238a8c
some more patch 2023-12-05 15:55:31 -07:00
Jason Penilla
7a59fd38d4
patches up to anti x ray 2023-12-05 15:32:41 -07:00
Jason Penilla
9d9fcf7e62
fix timings patch field use 2023-12-05 15:25:25 -07:00
Jason Penilla
1a33343012
some more patches 2023-12-05 15:21:44 -07:00
Jason Penilla
a30aad98f7
some patches 2023-12-05 15:12:48 -07:00
Jake Potrebic
c3f3edea07
port UnknownCommandEvent patch 2023-12-05 13:51:34 -08:00
Jason Penilla
dfac4f9df2
patches 2023-12-05 14:34:01 -07:00
Jason Penilla
fad3fa9bde
Update loot table and other patches 2023-12-05 14:20:44 -07:00
Nassim Jahnke
2a9a9c4cf0 Remove unnecessary import 2023-12-05 20:56:22 +01:00
Nassim Jahnke
2efd9bb99f More more more work 2023-12-05 20:54:55 +01:00
Nassim Jahnke
d7fc0c5ab2 More more work 2023-12-05 20:39:26 +01:00
Nassim Jahnke
603b32976b More work 2023-12-05 20:14:54 +01:00
Nassim Jahnke
9b56221762 Adventure (kind of) 2023-12-05 19:38:29 +01:00
Nassim Jahnke
8e8d6aeeb0 Finish API 2023-12-05 18:33:18 +01:00
Nassim Jahnke
2a1ace0cf2 Prepare for 1.20.3 dev 2023-12-05 18:20:55 +01:00
Jake Potrebic
931781c220
[ci skip] rebuild patches 2023-12-03 10:09:54 -08:00
Owen
9271ee7643
Dont resend blocks on interactions (#9413)
In general, the client now has an acknowledgment system that will cause block changes made by the client to be reverted correctly.

Essentially:

The client enters a "prediction" stage, where any block changes made will have its old blockstate captured (this is referred to as "server state").
If you update blocks during this stage, the client will update this captured server state as long as they're still currently predicting.
After prediction is done (via an ack packet) all captured blockstates are reverted to their captured server state.
This means that if the server actually updated a block and send a block update packet, it's correctly set, while if a block wasn't updated on the server but WAS updated on the client (server state wasn't updated), that change will be reverted.

It should be noted that this system does not yet support block entities, so those still need to be resynced when needed.

I discovered this when noticing that blocks broken outside of the player's valid interaction distance are still properly reverted, even though the server doesn't send any block updates, only an ack packet.
2023-12-02 22:41:35 -05:00
Jake Potrebic
8e061ce9c8
Add Structure check API (#9062) 2023-12-02 18:11:57 -08:00
Owen
5cbd5352b4
Fix Mushroom cow stew api (#9934) 2023-12-02 17:54:58 -08:00
Jake Potrebic
37bee09e3d
Restore vanilla entity drops behavior (#7650) 2023-12-02 17:35:10 -08:00
MrPowerGamerBR
ffa4115239
Configurable Dry and Wet Farmland Tick Rates (#9968)
* Configurable Dry and Wet Farm Land Nearby Water Tick Rates

* Rebase and squash

---------
2023-12-02 17:00:17 -08:00
hyper1423
40872ece07
Fix CraftMetaItem#addAttributeModifier duplication check (#9995) 2023-12-03 01:59:13 +01:00
MrPowerGamerBR
8bda1f72a5
Remove unnecessary durability check in ItemStack#isSimilar (#9979)
* Optimize "ItemStack#isSimilar(...)" by removing the unnecessary durability check

* Change patch name and add a better commit message
2023-12-02 13:31:25 -08:00
Jake Potrebic
2184fbca00
Log correct recipes and advancement count on server start (#9978) 2023-12-02 13:17:35 -08:00
waterlily1
9993eb9d16
Updates documentation in EntityEquipment.java (#9992)
* Updates documentation in EntityEquopment.java to reflect behavior mentioned in issue #9867

* rebase and squash patches

---------

Co-authored-by: schwaa96 <schwaa96@mi.fu-berlin.de>
2023-12-02 12:29:47 -08:00
Jason Penilla
2182d47792
Update mapping-io (#9975) 2023-11-28 15:18:21 -07:00
Jake Potrebic
4d111a32bb
Un-experimentalize Entity TP APIs (#9964) 2023-11-28 11:40:25 -08:00
Jake Potrebic
b37bbcfd98
Use ? super in Consumer/Predicate API (#9939) 2023-11-25 15:03:02 -08:00
Gijs de Jong
f9938d3949
Fix plugin bootstrap dependency tree population (#9963)
This patch fixes a bug where the dependency tree used for classpath joining,
wasn't built using the bootstrap dependencies, for plugin bootstrappers.
2023-11-25 17:57:12 -05:00
Jake Potrebic
0b20f94297
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9953)
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:
96340858 PR-938: Various Sound API improvements
cbfe0ff0 PR-937: Minor improvements to World#rayTrace documentation
e979ee95 PR-935: Change Consumer and Predicates to super
27ae46dc SPIGOT-3641, SPIGOT-7479, PR-931: Add missing values to EntityEffect
0616ec8b Add eclipse .factorypath file to .gitignore

CraftBukkit Changes:
8e162d008 PR-1301: Various Sound API improvements
eeb7dfc2d SPIGOT-7520: Attribute LootTableSeed missing for generated containers with attached LootTable
d433f086d PR-1297: Change Consumer and Predicates to super
864f616da SPIGOT-7518: Fix NullPointerException when calling Block#applyBoneMeal()
5a2d905af Add eclipse .factorypath file to .gitignore
7c6bf15d4 Fix SkullMeta configuration serialization / deserialization with note block sound

Spigot Changes:
7de1049b Rebuild patches
2023-11-25 14:34:42 -08:00
Jake Potrebic
8eac3e1b93
Don't fire EntityPotionEffectEvent during worldgen (#9965) 2023-11-25 14:18:37 -08:00
Warrior
8280211e52
Fix yaw being ignored for first spawn pos (#9959) 2023-11-25 14:09:26 -08:00
MrPowerGamerBR
faa2f475b0
Lazily create LootContext for criterions (#9969)
For each player on each tick, enter block triggers are invoked, and these create loot contexts that are promptly thrown away since the trigger doesn't pass the predicate

To avoid this, we now lazily create the LootContext if the criterion passes the predicate AND if any of the listener triggers require a loot context instance
2023-11-25 17:01:26 -05:00
TonytheMacaroni
334b2f20db
Fix max nearby entities class check (#9967) 2023-11-25 16:48:32 -05:00
Shane Freeder
ed753d34d2
Re-add missing vanilla safeMode arg 2023-11-25 09:49:48 +00:00
Jake Potrebic
96d5e6ca48
Code Generation for TypedKeys (#9233)
Currently includes generated key holder classes for types
used in the Registry Modification API
2023-11-22 20:56:28 -08:00
Tamion
eda3d537d6
[ci skip] Improve PlayerChatEvent Deprecation Message (#9956) 2023-11-22 05:46:51 +01:00
Isaac - The456
250388defe
add getAdvancementProgress() to PlayerAdvancementCriterionGrantEvent (#9865)
this allows for simpler checks for if an advancement would be given to a player,
and denying it (as the advancement grant event is non-cancelable)
2023-11-18 20:18:48 -05:00
booky10
86117967db
Fix missing event call for entity teleport API (#9937)
* Fix missing event call for entity teleport API

Previously a plugin couldn't cancel or modify an entity-teleport from another plugin.

* rebase
2023-11-18 20:05:34 -05:00
TonytheMacaroni
581c7434be
Add API to retrieve an attribute modifier from a UUID (#9924)
* Add attribute modifier from UUID API

* Add method to remove by UUID

* Add overload for UnmodifiableAttributeInstance, better precondition messages

* rebase
2023-11-18 19:55:57 -05:00
Jake Potrebic
39dee1ab52
More paper config cleanup (#9938)
Also adds a warning and error message if a newer config version
was found signaling a downgrade.
2023-11-18 16:29:14 -08:00
Jake Potrebic
e5274eeac9
Fix spawners checking max nearby entities with correct type (#8945)
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2023-11-18 15:59:12 -08:00
Bjarne Koll
0a8c873722
Call LivingEntity#onItemPickup before mutation (#9948)
The existing EntityPickupItemEvent fixes patch moves the call to LivingEntity#onItemPickup for piglins after the respective EntityPickupItemEvent calls, which is correct.
However the patch moved the call so far down the line that the existing logic already mutated the picked up item entity, leading to faulty state being passed to the onItemPickup method.

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

This was chosen above taking a copy of the original item and restoring state later on to avoid a full item stack clone.
2023-11-17 07:43:25 +01:00
SoSeDiK
ce7f068095
Correct typo in javadoc (#9944) 2023-11-13 19:25:46 +01:00
Jake Potrebic
f186318a91
Run the chat callback on the main thread as expected (#9935) 2023-11-11 15:33:19 -08:00
Jake Potrebic
a506b48daa
Fix several issues with EntityBreedEvent (#8677)
Upstream did not account for different hands when storing
the breed item for later use in the event. Also they only
stored a reference to the stack, not a copy so if the stack
changed after love mode was started, the breed item in the event
also changed. Also in several places, the breed item was stored after
it was decreased by one to consume the item.
2023-11-11 15:23:02 -08:00
Jake Potrebic
aee3830763
Deprecate Material#isInteractable (#9216) 2023-11-11 17:21:22 -05:00
booky10
9548629853
Add hand to fish event for all player interactions (#9929) 2023-11-11 23:00:45 +01:00
Jake Potrebic
531ef27e89
Use ApiStatus.Internal instead of Deprecated (#9042)
Mainly correctly marks a lot of still used "magic values"
as Internal instead of "Deprecated".
2023-11-11 13:52:32 -08:00
booky10
9ee60eca7d
Add aggressive mob API (#9838) 2023-11-11 16:17:36 -05:00
Owen
dd47ec6fe2
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
d8847bc1f3
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
63e77b531d
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 15:09:48 -05:00
Tamion
6675d13b31
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 12:09:14 -08:00
Jake Potrebic
c95bc5f86d
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
4675152f49
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
8cafc07297
Added missing enchantables to material tags (#9888) 2023-11-05 00:37:51 +01:00
Tamion
e289accb03
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-04 16:24:06 -07:00
NonSwag
2553f30153
fix secure profile with proxy online mode (#9700) 2023-11-05 00:12:47 +01:00
booky10
75d04e9b04
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 15:16:55 -07:00
TonytheMacaroni
23860da6c2
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 15:00:51 -07:00
TrollyLoki
8a3980c60b
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 16:32:10 -05:00
Jake Potrebic
0cdce89d59
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
15a0de2eef
Make Team extend ForwardingAudience (#9852) 2023-11-04 21:50:56 +01:00
booky10
43c343228e
Add entity API for getting the combined gene of a Panda (#9891) 2023-11-04 21:28:23 +01:00
Tamion
bffb08c2f9
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 13:20:13 -07:00
Jake Potrebic
6592fed511
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
aa6c4c11e5
Include packet class name in packet encoding error messages (#9907) 2023-11-04 12:34:34 -07:00
booky10
f78d7ce8ff
Remove "fix-curing-zombie-villager-discount" exploit option (#9895) 2023-11-04 20:20:01 +01:00
Lulu13022002
44057da467
Remove duplicate water-sensitivity damage for unaware mobs (#9908) 2023-11-04 12:10:27 -07:00
Warrior
230682d51b
Add raw iron & raw copper blocks to anti xray defaults (#7622) 2023-11-04 15:07:48 +00:00
TomTom
487109fddc
Readd 0414 use distance map to optimise entity tracker (#9868) 2023-11-03 14:05:57 +00:00
Nassim Jahnke
8493340be4 Add another slot sanity check 2023-11-03 14:49:55 +10:00
Md5Lukas
0b218903a8
Fix villager infection chance not being handled properly (#9897) 2023-11-01 14:59:00 -07:00
Jake Potrebic
1865625d95
Fix NPE when no valid world is found on legacy Players (#9885) 2023-10-29 15:33:32 +00:00
booky10
5bb30ce95b
Fix entity camera not being reset when cancelling spectating start/stop events (#9883) 2023-10-29 01:45:07 +01:00
Shane Freeder
415d7081d2
[ci skip] Fix author in last patch 2023-10-29 00:58:15 +01:00
Gero
a81a384303
Implement Velocity VarInt optimizations (#8418)
---------

Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2023-10-28 19:56:47 -04:00
booky10
5bdfb29ba1
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-28 19:25:46 -04:00
caramel
c6fac381ed
fix UnsafeValues#loadAdvancement doesn't recalculate position (#9846) 2023-10-28 16:13:33 -07:00
Kenox
8b1ac39e89
Fix warden spawn reason from DEFAULT to NATURAL (#8744) 2023-10-28 19:10:31 -04:00
caramel
52849f6da6
Cleanup disable explosion knockback patch (#9858) 2023-10-28 15:50:26 -07:00
Tamion
b1faa5d5f4
Fix PotionAPI ignores icon flag (#9864)
* fix PotionAPI ignores icon flag

* also fix CraftPotionUtil#toBukkit

* also CraftPotionUtil#fromBukkit

* use CraftPotionUtil
2023-10-28 15:39:47 -07:00
Warrior
b3cac042c1
Fix crash when version_history.json is empty (#9871) 2023-10-28 15:24:54 -07:00
SplotyCode
29350674b3
Fix null item in sendEquipmentChange (#9869) 2023-10-28 15:15:20 -07:00
Jake Potrebic
8cf2503804
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
996d529fb3
Resend entity using the bundle packet (#9853) 2023-10-27 15:48:13 +02:00
Jason Penilla
b974a6b6f3
Update paperweight to 1.5.9 (#9872) 2023-10-26 16:34:58 -07:00
Jake Potrebic
acc6d012b0
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9861) 2023-10-26 14:56:40 -07:00
Jason
c1ac98328c
Fix log level of advancement debug message (#9860) 2023-10-23 19:07:44 +02:00
Jake Potrebic
90fe0d58a5
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 20:12:00 +01:00
Shane Freeder
489bff9bbd
Temp fix for serialisable blockdata 2023-10-22 19:56:25 +01:00
MiniDigger | Martin
71a1787f6c
[ci skip] cleanup some ATs (#9840) 2023-10-21 17:17:55 -07:00
Lulu13022002
3a5c6f8cee
Fix NPE in SculkBloomEvent world access (#9857) 2023-10-21 13:20:24 -07:00
Brokkonaut
a3e4d1aa36
Don't check if we can see non-visible entities 2023-10-21 20:53:33 +01:00
Spottedleaf
4b0bc74c90 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
00331d943e 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
2f4281e2b4 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
e57af7d01e
sync netty version with vanilla (#9842) 2023-10-15 15:41:17 +01:00
caramel
44ee1cd05e
fix recipe packet limiter (#9841) 2023-10-15 15:11:15 +01:00
Md5Lukas
852c1c236d
Add additional tags to ItemMeta obfuscation filtering (#9665) 2023-10-14 23:41:15 +02:00
Md5Lukas
3e1c5e3eb0
Add BlockData setter for FallingBlock (#9829) 2023-10-14 22:46:31 +02:00
Jakub Zacek
e4d184f39d
Replace bukkit Consumers with java consumers (#9836) 2023-10-14 22:43:32 +02:00
froobynooby
3e9d2ac5f2
Don't call options events on login (#9834)
* Don't call options events on login

* Merge changes into client options API patch
2023-10-14 11:32:00 -07:00
SplotyCode
f613437019
Fix CraftPlayerProfile#setId regression (#9822) 2023-10-12 01:20:25 +00:00
Jake Potrebic
2f5bb7e306
add predicate recipe choice only for potion mixes (#9486) 2023-10-10 16:07:21 -07:00
Tamion
1a4778d260
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-10 15:38:25 -07:00
caramel
5509610db5
Fix UnsafeValues#loadAdvancement (#9753) 2023-10-10 15:19:00 -07:00
Jake Potrebic
7e5dd92f9f
fix flat bedrock world config (#9728) 2023-10-10 14:43:10 -07:00
TrollyLoki
69ce9276e4
Make setVelocity method of Fireballs change the travel direction to an arbitrary vector (#9815) 2023-10-10 23:09:45 +02:00
Xander de Keijzer
72f7945e77
Fix painting loosing art on face change (#9798) 2023-10-10 22:24:35 +02:00
Jake Potrebic
e87240b674
Fixes for loot tables (#9818) 2023-10-10 10:35:49 -07:00
Spottedleaf
99b735c1ac 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
a702a083cd
Move clientBrandName over to ServerPlayer (#9809) 2023-10-08 12:07:48 +02:00
Bjarne Koll
29a0209575
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 21:34:00 +01:00
Nassim Jahnke
cfe311d7a5
Fix item effects conversion if no tag is present
Fixes #9796
2023-10-05 16:03:26 +10:00
Nassim Jahnke
431e6418ab
Fixup player profile getters and constructor to expected nullability (#9770) 2023-10-05 05:31:24 +00:00
Warrior
02cfaa8ff8
Fix mobs not spawning when using an older config (#9793) 2023-10-04 10:08:47 -07:00
Shane Freeder
5eec4ec3bf
Quick tweaks to logical flow of getMapData 2023-10-04 16:25:26 +01:00
booky10
f36bb59739
Fix entity data not updated for firework attached to entity (#9783) 2023-10-03 18:29:44 -07:00
Jake Potrebic
6573d9555d
update configurate (#9230) 2023-10-03 18:06:23 -07:00
Nassim Jahnke
9d21a88218
Fix tests 2023-10-04 07:58:30 +10:00
Nassim Jahnke
bb1c0dd6fa
Implement tracking range y setting 2023-10-03 22:19:39 +10:00
Nassim Jahnke
f6969b6374
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 22:00:24 +10:00
Lulu13022002
38376f43a0
Some jd fixes (#9781) 2023-10-01 00:20:51 +00:00
Nassim Jahnke
c4ba28a21a
Don't throw when removing unplaced player in NearbyPlayers 2023-09-30 15:37:00 +10:00
Nassim Jahnke
0f69290f07
[ci skip] Fix typo (important) 2023-09-29 13:20:32 +10:00
Nassim Jahnke
4cdbb0c86c
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 13:05:28 +10:00
Jake Potrebic
1765917a6f
Fix creating the reverse map for loot table keys (#9766) 2023-09-28 16:29:34 -07:00
Spottedleaf
fe54a13b13 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:24 -07:00
Spottedleaf
b3b961f9d5 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
c207429b21 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
298c47857b
Fix tests that broke during the junit 5 update (#9757)
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2023-09-25 09:05:05 +10:00
Shane Freeder
3cf03fc31a
Fix/update wiki (#9758) 2023-09-25 09:02:46 +10:00
Shane Freeder
5cbce366b2 Handle new brand payload type 2023-09-24 19:48:29 +01:00
Warrior
5923b7d085
Fix missing map initialize event call & missing map id assignment (#9756) 2023-09-24 19:17:29 +01:00
Nassim Jahnke
e284bb1215
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 18:25:25 +10:00
Spottedleaf
7a00758b1b Rebuild patches 2023-09-23 23:41:38 -07:00
Spottedleaf
11138a770e Re-add remove streams for Brain AI patch 2023-09-23 23:40:49 -07:00
Spottedleaf
8b9e3dcd9e 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:40:49 -07:00
Nassim Jahnke
866d2d9f4a
Use correct ClientboundLevelChunkWithLightPacket constructor in later patch 2023-09-24 16:29:07 +10:00
Jake Potrebic
025c5d7a28
rebuild patches 2023-09-23 22:35:37 -07:00
Jake Potrebic
ea56138b30
Fix some issues 2023-09-23 22:33:49 -07:00
Spottedleaf
5dca26ce54 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:31:43 -07:00
Spottedleaf
84556f3cda Add lag compensation for breaking blocks 2023-09-23 22:31:42 -07:00
Spottedleaf
38dc3b25d8 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 22:31:00 -07:00
Nassim Jahnke
8d922746d9
Drop no longer needed patch 2023-09-24 13:09:52 +10:00
Nassim Jahnke
2ec643a53c
Readd anti xray and oversized block entity patches 2023-09-24 12:35:16 +10:00
Noah van der Aa
6be43952eb Migrate paper log ips option to new server.properties option 2023-09-23 23:21:21 +02:00
Jason Penilla
9624451ffd
Add missing kick event cause 2023-09-23 08:50:32 -07:00
Lulu13022002
b561a12078
Fix SuspiciousStewMeta 2023-09-23 16:41:51 +02:00
Lulu13022002
9c126fd2a9
fix test 2023-09-23 13:38:46 +02:00
Owen1212055
38b7565d9e
Remove Spigot Bug Fix for MC-109346 2023-09-23 01:51:40 -04:00
Owen1212055
8b512e3466
Support Paper ip address config + add missing logs 2023-09-23 01:50:13 -04:00
Nassim Jahnke
9df2066642
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:21:59 +10:00
Nassim Jahnke
a353f4d207
Readd network optimization patch 2023-09-23 11:45:34 +10:00
Spottedleaf
a50d7c340b 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
02807238c4
Fix chat processing 2023-09-23 09:58:19 +10:00
Nassim Jahnke
d23c4a50e6
Fix local attribute setting 2023-09-23 09:42:59 +10:00
Nassim Jahnke
b3ec8bd8ae
Revert "re-add distance map patch"
This reverts commit 81c5901c67.
2023-09-23 09:38:10 +10:00
Jake Potrebic
81c5901c67
re-add distance map patch 2023-09-22 16:26:10 -07:00
Jake Potrebic
47aeab84ad
fixup display slots patch (#9746) 2023-09-22 16:07:33 -07:00
Jake Potrebic
915bb9220e
Fixup advancement patch (#9745) 2023-09-22 16:03:34 -07:00
Spottedleaf
6af97e11b6 Port patches from folia dev/optimisations 2023-09-22 15:56:00 -07:00
Spottedleaf
d259503c92 Fix recursion with pathfind entity event
With the function overload, need to pass the entity
through to the super call
2023-09-22 15:39:00 -07:00
Spottedleaf
ea01aa335a Add some patches, fix compile 2023-09-22 15:33:14 -07:00
Spottedleaf
e88856dd75 Chunk system patch 2023-09-22 13:13:57 -07:00
Jason Penilla
896aa8b54a
Rebuild patches 2023-09-22 10:59:56 -07:00
Jason Penilla
ead3ddba32
Move unapplied patches so ATs import 2023-09-22 10:57:45 -07:00
MiniDigger | Martin
603c33df06 some more compile fixes 2023-09-22 19:43:52 +02:00
MiniDigger | Martin
1ebaffacf5 some compile fixes 2023-09-22 19:31:02 +02:00
Noah van der Aa
f4d8a64094 more more more more more more more more more more more work: passing the torch 2023-09-22 19:26:54 +02:00
Lulu13022002
63a1b0c137
some compile issues 2023-09-22 19:25:18 +02:00
Lulu13022002
a91e19f1df
more work
all server patches done (almost)
2023-09-22 18:59:52 +02:00
Lulu13022002
8baf510f92
some work 2023-09-22 18:11:35 +02:00
Noah van der Aa
ac7e4ad35e
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
3aa8e7ef3f
more more more more more more more more more more work 2023-09-22 17:35:51 +02:00
Noah van der Aa
4875ee4814
more more more more more more more more more work 2023-09-22 17:24:59 +02:00
Noah van der Aa
32d9c6684b
more more more more more more more more work 2023-09-22 17:08:04 +02:00
Noah van der Aa
772fb3e385
more more more more more more more work
can't let lynx inflate his commit count too much
2023-09-22 16:59:18 +02:00
Bjarne Koll
2617c927a0
More work work work work work work work work work 2023-09-22 16:42:56 +02:00
Bjarne Koll
e5bd562d28
Work here, work there, work for everyone 2023-09-22 16:35:40 +02:00
Bjarne Koll
452009bbde
Working hard on messing with leafs patches 2023-09-22 16:20:09 +02:00
Bjarne Koll
574bc968d3
More work 2023-09-22 15:47:26 +02:00
Bjarne Koll
95a31de306
More work work work 2023-09-22 15:33:37 +02:00
Bjarne Koll
af1090259a
Fix PaperAdvancementDisplay 2023-09-22 15:19:33 +02:00
Bjarne Koll
74094edf08
More more more (more ??) more work 2023-09-22 15:15:57 +02:00
Bjarne Koll
662b6c5ca8
Port sidebar slots patch 2023-09-22 14:33:54 +02:00
Bjarne Koll
79fef73926
More work work work 2023-09-22 14:22:24 +02:00
Bjarne Koll
00d82983bd
Missing paper comment 2023-09-22 13:42:04 +02:00
Bjarne Koll
2cb3a1a3dc
Fix leave message in common packet listener 2023-09-22 13:39:00 +02:00
Noah van der Aa
fc84aee124
more more more more more more work 2023-09-22 09:24:44 +02:00
Jake Potrebic
2cee84193c
and some more 2023-09-21 22:41:27 -07:00
Jake Potrebic
a62835bbb1
almost halfway done with server patches 2023-09-21 21:40:51 -07:00
Jake Potrebic
24fd5aea0c
and some more patches 2023-09-21 21:05:18 -07:00
Jake Potrebic
2bc818efd4
some more patches 2023-09-21 20:29:51 -07:00
Jake Potrebic
78a003ee89
work and compile errors 2023-09-21 20:17:35 -07:00
Jake Potrebic
7b29d1f4c5
even more work 2023-09-21 19:17:21 -07:00
Jake Potrebic
ef6a41195d
some more work 2023-09-21 15:26:51 -07:00
Jake Potrebic
a27262375c
some work 2023-09-21 15:01:00 -07:00
Noah van der Aa
c60dd35989
more more more more more work 2023-09-21 23:09:04 +02:00
Noah van der Aa
7ebfdd5e6d
more more more more work 2023-09-21 22:35:39 +02:00
Noah van der Aa
91671751e7
more more more work 2023-09-21 22:14:58 +02:00
Noah van der Aa
20253f478f
more more work 2023-09-21 21:54:46 +02:00
Noah van der Aa
2b72b74a36
more work 2023-09-21 21:00:11 +02:00
Noah van der Aa
b6e46e90cd
rebuild old indexes, first work 2023-09-21 19:39:51 +02:00
Noah van der Aa
6267e26420
So it begins... 2023-09-21 19:18:04 +02:00
Jake Potrebic
773dd72446
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 18:48:55 +02:00
Lulu13022002
3fd1502717
Add missing deprecation (#8886) 2023-09-21 10:35:38 +02:00
Jake Potrebic
1b1c23010a
Add missing InventoryHolders to inventories (#7400) 2023-09-17 19:16:48 -07:00
The456
581b683931
Fix spigot's Forced-Stats (#9663) 2023-09-17 03:27:56 +02:00
Warrior
a856073368
Fix two beacon bugs (#9675) 2023-09-16 17:36:10 -07:00
Jake Potrebic
ba0e1f54b9
Fix sapling observer detection and grow event (#9654) 2023-09-16 16:53:21 -07:00
Jake Potrebic
3cec9c985f
[ci skip] Add missing javadoc links (#9497) 2023-09-17 01:35:39 +02:00
Lulu13022002
d8af99a82c
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-16 16:27:11 -07:00
SoSeDiK
064fb50cc1
Cleanup old async commands patch (#8895) 2023-09-17 00:54:33 +02:00
Warrior
06a741d713
Fix leashed pets teleporting to owner when loaded (#9686) 2023-09-16 15:16:44 -07:00
Warrior
e312ebb1bd
Add DISPLAY tracking range type (#9668) 2023-09-17 00:02:58 +02:00
Warrior
ede9c06814
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-16 14:37:38 -07:00
thelooter
0c8e84c20d
Enforce sign line nullability when setting line with Adventure Method (#9689) 2023-09-16 23:18:51 +02:00
Aeltumn
deb92c2129
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 14:18:09 -07:00
MiniDigger | Martin
83cfeb1b37
Improve java version check (#9692) 2023-09-16 23:06:36 +02:00
Jake Potrebic
99b311de54
[ci skip] Clarify where furnace-related events are called (#8753) 2023-09-16 13:55:40 -07:00
Jake Potrebic
eb60bffa98
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
29d1c7b602
Call BlockRedstoneEvents for lecterns (#9721) 2023-09-14 23:17:53 +02:00
leguan
7145f41b6e
compression level change with config option (#9711) 2023-09-14 13:11:19 +02:00
TreemanKing
6378792a99
Add Barrel to LootableBlockInventory (#9687) 2023-09-14 13:04:36 +02:00
Duckulus
e68fd7162a
Add missing Piglin Dancing API (#8894) 2023-09-14 12:54:43 +02:00
Lulu13022002
eea0c649ca
Swap some nullable annotations (#9696) 2023-09-14 12:44:12 +02:00