3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00
Commit graph

9293 Commits

Autor SHA1 Nachricht Datum
Lulu13022002
1ed64f8270
Update launchProjectile API (#11300) 2024-09-21 21:19:02 +02:00
Jake Potrebic
593faf4fc3
Create TileStateInventoryHolder (#11420)
Adds a missing interface to centralize getSnapshotInventory methods.
2024-09-21 20:09:29 +02:00
Bjarne Koll
5bcb2ff9e4
Correctly launch WindCharges (#11418)
The launch API on LivingEntity only respected the WindCharge type, not
its near-clone BreezeWindCharge.

This commit correctly accounts for BreezeWindCharge in
CraftLivingEntity.
2024-09-21 20:08:31 +02:00
Newwind
d61175421d
Disable pretty printing for advancement saving (#11419) 2024-09-21 20:01:22 +02:00
Bjarne Koll
9c450388e1
Return null in getRegistry(Class) for unknown type (#11422)
The Bukkit#getRegistry(Class) method contract specifies that it returns
null for unknown registry types. The current implementation however
requires the passed class to be mappable to a known registry key.

For types like Material, which have a SimpleRegistry in bukkit's
Registry interface, no server side registry exists and such the type
cannot be mapped to a registry key.

The commit correctly returns null for types that are not mappable to a
registry key instead of throwing a NullPointerException.
2024-09-21 19:57:08 +02:00
Bjarne Koll
c5a10665b8
Remove wall-time / unused skip tick protection (#11412)
Spigot still maintains some partial implementation of "tick skipping", a
practice in which the MinecraftServer.currentTick field is updated not
by an increment of one per actual tick, but instead set to
System.currentTimeMillis() / 50. This behaviour means that the tracked
tick may "skip" a tick value in case a previous tick took more than the
expected 50ms.

To compensate for this in important paths, spigot/craftbukkit
implements "wall-time". Instead of incrementing/decrementing ticks on
block entities/entities by one for each call to their tick() method,
they instead increment/decrement important values, like
an ItemEntity's age or pickupDelay, by the difference of
`currentTick - lastTick`, where `lastTick` is the value of
`currentTick` during the last tick() call.

These "fixes" however do not play nicely with minecraft's simulation
distance as entities/block entities implementing the above behaviour
would "catch up" their values when moving from a non-ticking chunk to a
ticking one as their `lastTick` value remains stuck on the last tick in
a ticking chunk and hence lead to a large "catch up" once ticked again.

Paper completely removes the "tick skipping" behaviour (See patch
"Further-improve-server-tick-loop"), making the above precautions
completely unnecessary, which also rids paper of the previous described
incompatibility with non-ticking chunks.
2024-09-19 16:36:07 +02:00
Shane Freeder
5c82955733
Only mark decorations dirty if a removal actually occurs (#11413)
* Only mark decorations dirty if a removal actually occurs

Vanilla calls this method blindly inside of a loop which erroniously marks
map data files as being dirty even if nothing has actually changed.

* Merge into existing patch

---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-09-19 16:27:33 +02:00
4real
2aaf4369b6
Validate slot in PlayerInventory#setSlot (#11399) 2024-09-17 16:57:32 +02:00
Bjarne Koll
1348e44173
Prevent NPE when serializing unresolved profile (#11407)
In the recent upstream update, the paper player profile was updated to
correctly return null for both name and id if constructed as such. This
change however broke the serialisation logic, as it depended on the name
never being null.

The commit moves the checks over to the newly introduced emptyName/UUID
fields that track if the profile was constructed with a null name or
uuid to differentiate it against an empty string or the NIL_UUID.
2024-09-16 20:53:00 +02:00
Tamion
13a23951d7
Fix enable-player-collisions playing sounds when set to false (#11390) 2024-09-15 22:26:23 +02:00
Tamion
951e7ddc44
Fix TrialSpawner forgetting assigned mob when placed by player (#11381) 2024-09-15 22:20:38 +02:00
Jake Potrebic
0a53f1d10d
Set default drop behavior for player deaths (#11380) 2024-09-15 21:51:35 +02:00
Bjarne Koll
d1a72eac31
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11405)
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:
1fc1020a PR-1049: Add MenuType API
8ae2e3be PR-1055: Expand riptiding API
cac68bfb SPIGOT-7890: AttributeModifier#getUniqueId() doesn't match the UUID passed to its constructor
7004fcf2 SPIGOT-7886: Fix mistake in AttributeModifier UUID shim
1ac7f950 PR-1054: Add FireworkMeta#hasPower
4cfb565f SPIGOT-7873: Add powered state for skulls

CraftBukkit Changes:
bbb30e7a8 SPIGOT-7894: NPE when sending tile entity update
ba21e9472 SPIGOT-7895: PlayerItemBreakEvent not firing
0fb24bbe0 SPIGOT-7875: Fix PlayerItemConsumeEvent cancellation causing client-side desync
815066449 SPIGOT-7891: Can't remove second ingredient of MerchantRecipe
45c206f2c PR-1458: Add MenuType API
19c8ef9ae SPIGOT-7867: Merchant instanceof AbstractVillager always returns false
4e006d28f PR-1468: Expand riptiding API
bd8aded7d Ignore checks in CraftPlayerProfile for ResolvableProfile used in profile components
8679620b5 SPIGOT-7889: Fix tool component deserialisation without speed and/or correct-for-drops
8d5222691 SPIGOT-7882, PR-1467: Fix conversion of name in Profile Component to empty if it is missing
63f91669a SPIGOT-7887: Remove duplicate ProjectileHitEvent for fireballs
7070de8c8 SPIGOT-7878: Server#getLootTable does not return null on invalid loot table
060ee6cae SPIGOT-7876: Can't kick player or disconnect player in PlayerLoginEvent when checking for cookies
7ccb86cc0 PR-1465: Add FireworkMeta#hasPower
804ad6491 SPIGOT-7873: Add powered state for skulls
f9610cdcb Improve minecart movement

Spigot Changes:
a759b629 Rebuild patches

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-09-15 21:39:53 +02:00
Nassim Jahnke
4ff58c4c48
Update spark 2024-09-12 19:54:34 +02:00
Jason Penilla
e945cfe1c5
Fix PaperServerListPingEvent#getPlayerSample not being populated or used (#11387) 2024-09-10 19:52:30 +02:00
Jake Potrebic
61fe23cd08
deprecate isEnabledByFeature in Item/BlockType 2024-09-09 19:19:46 -07:00
Fabrizio La Rosa
971a7a5511
Add Decorated Pot Cracked API (#11365) 2024-09-08 22:12:36 +02:00
masmc05
b09eaf2e8d
Add Item serialization as json api (#11235)
* Item serialization as json

* Add ItemStackAdapter for Gson

* A javadoc note at #serialize() and #deserialize()

* Rebase

* Move serialize closer to deserialize

* Add explaining comment about SERIALIZE_CUSTOM_AS_SNBT usage

* Apply lynxplay requests

* Forgot `@NotNull`

* Very important diff was removed

* Rebase

* Javadocs

---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-09-08 12:58:30 -07:00
Jake Potrebic
7632de5134
Tag Lifecycle Events (#10993)
* wip tags

* use generics in tag registrars

* comment out varargs methods for now

* split up patch

* cache loaded service provider

* finish renames

* use builderWithExpectedSize

* finalize
2024-09-08 11:56:09 -07:00
Nassim Jahnke
1ba1be7d26
Update Velocity natives again
If you segfault, update your jre/jdk™️
2024-09-08 20:39:00 +02:00
Jake Potrebic
426f9924a5
Enchantment is data-driven, so not FeatureDependant (#11377) 2024-09-08 10:42:44 -07:00
Jake Potrebic
925c3b9d2b
Add FeatureFlag API (#8952)
* Add FeatureFlag API

* switch to index & move method

* fix test
2024-09-07 13:35:11 -07:00
Jake Potrebic
a8e6a93aec
Deprecate for removal all OldEnum-related methods (#11371) 2024-09-07 13:02:45 -07:00
Jake Potrebic
5d91bef46f
Fix shulkerbox loot table replenish (#11366)
* Fix shulkerbox loot table replenish

* re-add loot table if cleared

* add config
2024-09-07 12:49:28 -07:00
Pedro
0e825274e5
Fix NPE while trying to respawn an already disconnected player (#11353) 2024-09-07 21:34:03 +02:00
Bjarne Koll
21f125f3c2
Revert velocity natives to 3.1.2 (#11368)
The updated velocity native compilation pipeline seems to emit binaries
that are not compatible with alpine.
The commit temporarily reverts the natives included until a proper
solution is found.
2024-09-07 11:00:57 +02:00
Newwind
3db475838f
Check dead flag in isAlive() (#11330)
* Create 1055-Check-dead-flag-in-isAlive().patch

* Rebase
2024-09-06 15:06:32 -07:00
Lulu13022002
e0021b15b6
Fix allowSpiderWorldBorderClimbing world config (#11321) 2024-09-06 23:15:29 +02:00
Jake Potrebic
805a97444a
Improve console completion with brig suggestions (#9251)
* Improve console completion with brig suggestions

* silence warning

* small fixes

* squashed
2024-09-06 13:37:09 -07:00
VelVeV
10f5879992
Change condition check order of entity tracking Y (#11348) 2024-09-06 22:14:20 +02:00
nathannm23
953e6e9918
Fire BlockExpEvent on grindstone use (#11346) 2024-09-06 22:14:10 +02:00
VelVeV
012c527671
Update Velocity natives (#11347) 2024-09-06 21:44:24 +02:00
lucko
691d452643
Fix bundled spark permission check (#11355) 2024-09-06 21:41:54 +02:00
Nassim Jahnke
ff251e42b6
Use reference hash set in reference Holder (#11363) 2024-09-06 21:03:17 +02:00
Space Walker
b483da4e02
Update Alternate Current to v1.9 (#11333) 2024-09-01 10:59:20 -07:00
Tamion
227c94ae21
Fix inventory desync when placing blocks with spawn protection (#11090)
* fix

* mention mojira issue

* move to vanilla bug fixes patch

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-08-31 12:01:29 -07:00
Tamion
2f0891ed81
Fix InventoryOpenEvent cancellation (#11304)
* fix

* other blocks

* add missing diff in ContainerEntity

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-08-31 11:50:24 -07:00
Newwind
509ea2fd17
Fix horse armor desync (#11341) 2024-08-31 20:29:50 +02:00
Jason Penilla
e01ddf4627
Fixup porting issue in vanillaBiomeProvider impl (#11185) 2024-08-31 19:59:17 +02:00
Nassim Jahnke
25621248d3
[ci skip] Create SECURITY.md (#11331) 2024-08-27 18:12:32 +02:00
Gegy
e08e6679fc
Fix: synchronise sending chat to client with updating message signature cache (#11332)
In the case where multiple messages from different players are being processed in parallel, there was a potential race condition where the messages would be sent to the client in a different order than the message signature cache was updated. However, the cache relies on the fact that the client and server get the exact same updates in the same order. This race condition would cause the caches to become corrupted, and any future message received by the client would fail to validate.

This also applies to the last seen state of the server, which becomes inconsistent in the same way as the message signature cache and would cause any messages sent to be rejected by the server too.
2024-08-26 19:53:28 +02:00
Lulu13022002
789a267e93
Re-implement maxLeashDistance world conf and call missing event (#11301)
* Re-implement maxLeashDistance world config and call missing event

* migrate config setting to double or default

* fixes

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-08-25 14:32:32 -07:00
okx-code
a7b8d9574e
Add enchantment seed update API (#11282) 2024-08-25 22:39:06 +02:00
Isaac - The456
dd8c70a851
Ensure TabCompleteEvent always has a mutable backing list. (#11302) 2024-08-25 22:28:32 +02:00
DerEchtePilz
374d9c85ba
Add a method to reset Lodestone compasses back to normal ones (#11308) 2024-08-25 22:25:13 +02:00
DerEchtePilz
ad4c524c2f
Properly destroy placed blocks on the end platform (#11292) 2024-08-25 21:19:40 +02:00
Jake Potrebic
e2da65c689
Deprecate API relating to menu title changes (#11309) 2024-08-25 20:56:17 +02:00
Jake Potrebic
5167856bb8
Fix despawn ranges by defaulting to an ellipsoid shape (#11312) 2024-08-25 20:26:33 +02:00
Newwind
5b2c43edaf
Remove set damage lootable item function from compasses (#11317) 2024-08-25 19:52:12 +02:00
Newwind
94444cebc3
Fix incorrect timestamp in region file header recalculation (#11318) 2024-08-25 19:42:15 +02:00