Commit graph

3413 commits

Author SHA1 Message Date
Bjarne Koll
e7c58ce74f 963 2024-10-24 17:16:31 +02:00
Bjarne Koll
3a9a8b1d29 Readd wrongly removed diff 2024-10-24 16:31:09 +02:00
Owen1212055
a11f1c8dbf Patch 2024-10-24 10:02:45 -04:00
Owen1212055
26e2a9cbd2 Patch 2024-10-24 09:53:28 -04:00
Owen1212055
3f5491e0b7 Patch 2024-10-24 09:25:36 -04:00
Bjarne Koll
199ab95b0d Patch me this, patch me that 2024-10-24 12:11:32 +02:00
Bjarne Koll
951043246e Patches, patches, patches 2024-10-24 10:42:29 +02:00
Noah van der Aa
8b9b485cab good luck americans 2024-10-24 00:42:38 +02:00
Noah van der Aa
fae4894a2b MOOOOOOOOOOOOOORE 2024-10-24 00:32:21 +02:00
Noah van der Aa
dac68bef4a fix gruesome copyright violation 2024-10-24 00:11:28 +02:00
Noah van der Aa
a364eb48e7 MOOOOOOOOOOORE 2024-10-24 00:08:29 +02:00
Noah van der Aa
56700a6f23 MOOOOOOOORE 2024-10-23 23:35:21 +02:00
Noah van der Aa
d523c6211b MOOOOORE 2024-10-23 23:12:09 +02:00
Noah van der Aa
57a91fb883 moooore 2024-10-23 22:52:43 +02:00
Shane Freeder
630bdd8cda A bunch more 637 2024-10-23 21:10:14 +01:00
Shane Freeder
615e1d5a6a A bunch of patches 2024-10-23 20:43:06 +01:00
Bjarne Koll
c9e7a34e4b Work work work work 2024-10-23 20:50:46 +02:00
Bjarne Koll
592816683c 553 2024-10-23 20:15:25 +02:00
Bjarne Koll
0a91b13eb3 503 2024-10-23 19:46:06 +02:00
Bjarne Koll
0047482c6f Some more work 2024-10-23 17:58:11 +02:00
Bjarne Koll
986b61757e 440 2024-10-23 17:13:43 +02:00
Bjarne Koll
49575a0657 400 2024-10-23 16:55:24 +02:00
Owen1212055
e486dd7445 Patch 2024-10-23 10:08:40 -04:00
Owen1212055
4ed93c52b4 Patch 2024-10-23 10:04:01 -04:00
Owen1212055
3342d91bd6 Patches 2024-10-23 09:54:09 -04:00
Bjarne Koll
078eb7f455 298 2024-10-23 15:02:51 +02:00
Bjarne Koll
c2e37b8c98 Skip Improve-exact-choice-recipe-ingredients for now 2024-10-23 14:12:17 +02:00
Bjarne Koll
292fb8b8e7 Fluid Flowing ifLoaded patch 2024-10-23 13:13:00 +02:00
Bjarne Koll
de0ed829eb 242 2024-10-23 12:32:08 +02:00
Bjarne Koll
5a3a8af328 Update projectile launch to 1.21.2 2024-10-23 12:02:36 +02:00
Bjarne Koll
25c384ac38 Breakpoint before projectile mess 2024-10-23 11:04:00 +02:00
Bjarne Koll
38e1465620 Work work work 2024-10-23 00:02:50 +02:00
Bjarne Koll
149a25fb83 Work it 2024-10-22 23:30:51 +02:00
Bjarne Koll
2e66bc9719 More work? 2024-10-22 22:38:26 +02:00
Bjarne Koll
649ade0d96 Some work 2024-10-22 22:00:33 +02:00
Noah van der Aa
8e550effe8 oops 2024-10-22 20:09:28 +02:00
Noah van der Aa
9ece54ccdd first 100! 2024-10-22 20:04:31 +02:00
Noah van der Aa
1fd2daa6a6 First batch of server patches 2024-10-22 19:28:57 +02:00
Noah van der Aa
aecac94dbf Bundles are no longer experimental (thanks lynx) 2024-10-22 18:43:46 +02:00
Noah van der Aa
ce3c2d7776 you saw nothing 2024-10-22 18:32:41 +02:00
Noah van der Aa
510057a8ad okaaay let's go 2024-10-22 18:23:19 +02:00
Lulu13022002
33ff3dff21 Restrict BlockProjectileSource#launchProjectile
Spigot recently revamped their CraftBlockProjectileSource impl to make use of
the the ProjectileItem logic. During this move however, a couple of types were
added which do not provide a sensible ProjectileItem implementation.

The commit restricts the API once again to types that represent useful
ProjectileItems, removing support for the trident, enderpearl and breeze variant
of the windcharge.
2024-10-21 18:17:45 +02:00
Shane Freeder
5912598c02 Some small touchups to the GUI (#11505)
As noted on the issue, the method here can blow up in
certain cases, the GUI logic already handles "the mouse is missing",
and so, we'll just catch this and move on.

Misc fix - There is probably an issue report for this somewhere,
but, the details section utilised the bukkit singleton to try to get
the TPS from the server. We already have the MinecraftServer instance
passed into us, and so we'll just get the information directly from there instead.

Fixes: #11494
2024-10-21 00:10:10 +01:00
Shane Freeder
9ad769150f Always send Banner patterns to the client (#11506)
The mojang client will not remove patterns from a Banner when none
are sent inside of an update packet, given that this is not an expected
flow for them, this is not all too surprising. So, we shall resort to always
sending the patterns over the network for update packets.

Fixes: #11487
2024-10-21 00:02:00 +01:00
caramel
75f88df856 Fix potential annotation testing interruption (#11460) 2024-10-21 07:46:50 +09:00
Bjarne Koll
7c5395237d Updated Upstream (Bukkit/CraftBukkit) (#11501)
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:
bb4e97c6 Add support for Java 23
bc6874dd Bump asm to 9.7.1
50e8a00b PR-1064: Add specific getTopInventory methods for InventoryView derivatives
758b0a0f SPIGOT-7911: Fix Location#isWorldLoaded() for re-loaded worlds
133a64a7 Improve Registry#getOrThrow messages
be0f5957 PR-1058: Add tests for Minecraft registry <-> Bukkit fields
d1b31df2 PR-1062: Clarify BeaconView documentation
3fab4384 PR-1060: Cache Material to BlockType and ItemType conversion
967a7301 SPIGOT-7906: Increase YAML nesting limit to 100
6ecf033d SPIGOT-7899: Smithing recipes don't require inputs

CraftBukkit Changes:
0a7bd6c81 PR-1493: Improve reroute performance and add some tests
54941524c Add support for Java 23
f4d957fff SPIGOT-7915: Fix World#getKeepSpawnInMemory() using Spawn Radius rather than Spawn Chunk Radius
ded183674 Fix HIDE_ENCHANTS flag in items without enchantments
308785a0a Bump asm to 9.7.1 and re-add ClassReader to ClassWriter
72ce823cd PR-1487: Add specific getTopInventory methods for InventoryView derivatives
11a5e840c SPIGOT-7907, PR-1484: Improve merchant recipe item matching behavior to more closely align with older versions
45b66f7e4 SPIGOT-7909: Always set HIDE_ENCHANTS flag to item if flag is set
963459791 Increase outdated build delay
fc5b2d75f SPIGOT-7910: Fix launching breeze wind charge from API and improve dispenser launch API
c7d6428f2 SPIGOT-7856, PR-1483: End platform not dropping items after replacing blocks
2a5572b52 SPIGOT-7780, PR-1482: Cannot edit chunks during unload event
527041ab5 SPIGOT-7902, PR-1477: Fix CraftMetaPotion#hasCustomEffects() does not check if customEffects (List) is empty
5529a1769 Implement base methods for tags
30fbdbaaf Improve Registry#getOrThrow messages
6b71a7322 PR-1475: Add tests for Minecraft registry <-> Bukkit fields
5f24c255c SPIGOT-7908: Mark junit-platform-suite-engine as test scope
e4c92ef65 PR-1473: Change tests to use suites, to run tests in different environments and feature flags
d25e1e722 PR-1481: Fix BeaconView#set[X]Effect(null)
d69a05362 PR-1480: Fix PerMaterialTest#isEdible test running for legacy materials
bb3284a89 PR-1479: Use custom #isBlock method in legacy init instead of the one in Material, since it relies on legacy being init
98c57cbbe SPIGOT-7904: Fix NPE for PlayerItemBreakEvent
f35bae9ec Fix missing hasJukeboxPlayable
8a6f8b6d8 SPIGOT-7881: CTRL+Pick Block saves position data into item
7913b3be7 SPIGOT-7899: Smithing recipes don't require inputs
2024-10-21 00:06:54 +02:00
Shane Freeder
64705c224b [ci skip] rebuild patches 2024-10-17 21:24:10 +01:00
Spottedleaf
d24e41986e Add proper async player disconnections
Blocking can cause performance problems
2024-10-16 07:00:40 -07:00
Pedro
a0cb2d37ed Add AnvilView#bypassEnchantmentLevelRestriction (#11475) 2024-10-12 18:10:05 -03:00
Lulu13022002
4286dff3d0 Add offline PDC API (#8117) 2024-10-12 21:38:18 +02:00
TonytheMacaroni
7c831941e2 Fix CraftMagicNumbers#getTag (#11484) 2024-10-09 16:58:13 -04:00
Nassim Jahnke
43ee3e4a1e Check if leash tag has a uuid 2024-10-03 17:10:27 +02:00
Jake Potrebic
ec8b5b419f Use components properly in ProfileWhitelistVerifyEvent (#11456) 2024-10-02 05:32:05 -07:00
Nassim Jahnke
8d3c6e1052 Fix hex color check 2024-10-02 13:49:39 +02:00
Jake Potrebic
0adf5876db Finish converting most of the undeprecated api to jspecify 2024-09-30 11:44:36 -07:00
Jake Potrebic
29a25df60e Finish converting all events to jspecify annotations 2024-09-29 16:48:34 -07:00
Bjarne Koll
fa97c59a4e Do not NPE on uuid resolution in player profile (#11449)
Band-aid fix for the player profile api resolution for a profile with
name but without uuid. The real solution is a proper refactoring of the
completeFromCache and complete method internally, however this needs
further consideration regarding existing faulty behaviour around name
lookups from uuid-only profiles.
2024-09-30 00:26:44 +02:00
Axionize
6e485c3409 Configurable per-world void damage offset/damage(#11436) 2024-09-29 18:06:13 -04:00
Noah van der Aa
74e7902624 Add PlayerInsertLecternBookEvent [1.20 port] (#7305)
* Add PlayerInsertLecternBookEvent

* Rebase

Additionally, moves the event call higher up and removes the lectern
block state clone from the event.

* jSpecify

* Shrink correctly

* style fixups

* move methods

* rename param to cancel

* fix javadocs

* more javadoc fixes

* fix co-author on patch from yesterday

* last fix

---------

Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2024-09-29 23:28:48 +02:00
Jake Potrebic
64e918335c Begin switching to JSpecify annotations (#11448)
* Begin switching to JSpecify annotations

* more

* fixes
2024-09-29 12:52:13 -07:00
Jake Potrebic
fa1f6a5d78 Call bucket events for cauldrons (#7486) 2024-09-28 15:04:11 -07:00
Esoteric Enderman
96dde2d730 Add API for explosions to damage the explosion cause (#11180)
This intends to give plugin developers more control over explosions created using the World#createExplosion method, specifically by adding the option for explosions to damage the explosion cause (not the default behavior, and previously impossible to do, as far as I know). This is done by overloading existing methods with an extra `excludeSourceFromDamage` parameter.

Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2024-09-28 20:32:56 +01:00
Tamion
afe5fc14c8 Add startingBrewTime (#11406)
* add startingBrewTime

* casting

* requests

* comments and fix setBrewTime

* a

* b

* move to own class

* rename

* missing Paper comment

* missing experimentals

* rebased

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-09-28 21:14:20 +02:00
Jake Potrebic
a1cb6c43d2 Improve entity effect API (#11444) 2024-09-28 11:05:45 -07:00
Jake Potrebic
eba36b62bd Fix console completions on invalid commands (#7603) 2024-09-27 11:05:15 -07:00
masmc05
d89b0fb649 Add enchantWithLevels with tag specification (#11438)
* Add enchantWithLevels with tag specification

* Finalise

---------

Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2024-09-27 21:04:57 +03:00
Jake Potrebic
e1c46e67a5 fix ItemStack#removeEnchantments creating non-stackable items (#11442) 2024-09-27 10:58:11 -07:00
Jake Potrebic
c40eeeefec Remove redundant fillUsableCommands call (#11425) 2024-09-27 09:49:18 -07:00
Jake Potrebic
ddd068d513 Deprecate for removal Block#isValidTool (#11439)
The method's implementation uses Block#getDrops
which re-computes the drops from the loot table each
call leading to isValidTool returning different values
with subsequent calls.
2024-09-27 09:28:04 -07:00
Brokkonaut
fb91090522 Call EntityDropItemEvent when a container item drops its contents (#11441) 2024-09-27 18:27:14 +02:00
Stefano
4ffc9d9c0c Adjust HAProxy's existance to log for console masters (#11433) 2024-09-27 18:19:29 +02:00
Jake Potrebic
ae51e7b8ff use correct types for preloading CraftRegistry
also add a check in CraftRegistryEntry constructor to
make sure preload class isn't in net.minecraft package
2024-09-26 14:20:09 -07:00
Jake Potrebic
ee957a53ba Fix tag lifecycle event handlers not disabling /reload 2024-09-24 19:33:30 -07:00
Jake Potrebic
653a12cc46 Add missing key files and cleanup registry definition order 2024-09-23 17:36:29 -07:00
Jake Potrebic
660700a1d3 make MenuType implement FeatureDependant 2024-09-23 15:03:52 -07:00
Jake Potrebic
f137f3cf13 Only call EntityPortalExitEvent if entity is actually in a portal 2024-09-22 14:35:04 -07:00
Jake Potrebic
802cb228d7 Expand out datapack API (#10828)
* Expand out datapack API

* add getTitle

* better enable check
2024-09-22 14:28:45 -07:00
TreemanKing
8f59e0a8a4 Fix Color Particle API (#10895)
* fix: check datatype of particles rather than particle-type

* feature: add ARGB channels

It keeps the functionality of the original color(int).

* fix: order

* fixes

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-09-23 07:06:40 +10:00
Nassim Jahnke
300db3cfd0 Fixup command precprocess cancellation (#11424) 2024-09-22 21:25:37 +02:00
Nassim Jahnke
e53a1f5e22 Add ItemStack array serialization methods (#10387) 2024-09-22 21:02:06 +02:00
Oliver Janka
36472a9173 Add velocity forwarding secret env override (#10127)
Previously, the velocity forwarding secret could only be configured via
the configuration option in the global paper configuration.
This makes configuring/passing such a value rather difficult for
containerized/orchestrated servers as these configuration files are
usually part of the server data volume itself and hence cannot be
sourced from a secret.

This commit enables administrators to define the PAPER_VELOCITY_SECRET
environment variable, which will override any potentially configured
velocity secret.
2024-09-22 20:25:27 +02:00
Bjarne Koll
e371c168d8 Deprecate BlockType#isInteractable (#11427)
While BlockType is still marked as internal, it mirrors the already
paper-deprecated method #isInteractable.

The commit marks said method as deprecated if/when BlockType becomes
experimental/non-internal.
2024-09-22 20:09:41 +02:00
Lulu13022002
b54562400c Update launchProjectile API (#11300) 2024-09-21 21:19:02 +02:00
Jake Potrebic
5b9ea906ed Create TileStateInventoryHolder (#11420)
Adds a missing interface to centralize getSnapshotInventory methods.
2024-09-21 11:09:29 -07:00
Bjarne Koll
a3916fd4da 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
2bb8e69297 Disable pretty printing for advancement saving (#11419) 2024-09-21 19:01:22 +01:00
Bjarne Koll
1b174804c7 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
f65939c6bd 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
5d6137bcc9 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 <git@lynxplay.dev>
2024-09-19 15:27:33 +01:00
4real
d90c4f37f6 Validate slot in PlayerInventory#setSlot (#11399) 2024-09-17 17:57:32 +03:00
Bjarne Koll
85d19c8d5b 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
8569d1f04b Fix enable-player-collisions playing sounds when set to false (#11390) 2024-09-15 22:26:23 +02:00
Tamion
11d73159d4 Fix TrialSpawner forgetting assigned mob when placed by player (#11381) 2024-09-15 22:20:38 +02:00
Jake Potrebic
7669a1097e Set default drop behavior for player deaths (#11380) 2024-09-15 12:51:35 -07:00
Bjarne Koll
aee3dfd092 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
2ac5a53f6b Update spark 2024-09-12 19:54:34 +02:00
Jason Penilla
0b7b70d405 Fix PaperServerListPingEvent#getPlayerSample not being populated or used (#11387) 2024-09-10 10:52:30 -07:00
Jake Potrebic
d503cbe01f deprecate isEnabledByFeature in Item/BlockType 2024-09-09 19:19:46 -07:00
Fabrizio La Rosa
5bfe411ab7 Add Decorated Pot Cracked API (#11365) 2024-09-08 22:12:36 +02:00
masmc05
988b902234 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 <git@lynxplay.dev>
2024-09-08 22:58:30 +03:00
Jake Potrebic
969432263f 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
a21216b976 Update Velocity natives again
If you segfault, update your jre/jdk™️
2024-09-08 20:39:00 +02:00
Jake Potrebic
d1190734bc Enchantment is data-driven, so not FeatureDependant (#11377) 2024-09-08 10:42:44 -07:00
Jake Potrebic
fc2cdc7db9 Add FeatureFlag API (#8952)
* Add FeatureFlag API

* switch to index & move method

* fix test
2024-09-07 13:35:11 -07:00
Jake Potrebic
b91a342aa2 Deprecate for removal all OldEnum-related methods (#11371) 2024-09-07 13:02:45 -07:00
Jake Potrebic
2c264ee7c0 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
83ba6295a8 Fix NPE while trying to respawn an already disconnected player (#11353) 2024-09-07 15:34:03 -04:00
Bjarne Koll
9d935c67e6 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
4a8d483d21 Check dead flag in isAlive() (#11330)
* Create 1055-Check-dead-flag-in-isAlive().patch

* Rebase
2024-09-06 23:06:32 +01:00
Lulu13022002
5217983dca Fix allowSpiderWorldBorderClimbing world config (#11321) 2024-09-06 23:15:29 +02:00
Jake Potrebic
d668e93940 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
5bf1879bed Change condition check order of entity tracking Y (#11348) 2024-09-07 05:14:20 +09:00
nathannm23
5ff3e52f47 Fire BlockExpEvent on grindstone use (#11346) 2024-09-06 14:14:10 -06:00
VelVeV
9ffce8d935 Update Velocity natives (#11347) 2024-09-07 04:44:24 +09:00
lucko
303dbb3695 Fix bundled spark permission check (#11355) 2024-09-06 20:41:54 +01:00
Nassim Jahnke
daecf055f5 Use reference hash set in reference Holder (#11363) 2024-09-06 21:03:17 +02:00
Space Walker
3f3175814b Update Alternate Current to v1.9 (#11333) 2024-09-01 19:59:20 +02:00
Tamion
eb3c4a33e7 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 21:01:29 +02:00
Tamion
4e20fc68d1 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 20:50:24 +02:00
Newwind
973bb47949 Fix horse armor desync (#11341) 2024-08-31 19:29:50 +01:00
Jason Penilla
5b96be4ce6 Fixup porting issue in vanillaBiomeProvider impl (#11185) 2024-08-31 10:59:17 -07:00
Gegy
dc8d16ed3d 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
e24e14e58d 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 23:32:32 +02:00
okx-code
4a97c636b7 Add enchantment seed update API (#11282) 2024-08-25 21:39:06 +01:00
Isaac - The456
a41ced0e65 Ensure TabCompleteEvent always has a mutable backing list. (#11302) 2024-08-25 21:28:32 +01:00
DerEchtePilz
900192b490 Add a method to reset Lodestone compasses back to normal ones (#11308) 2024-08-25 22:25:13 +02:00
DerEchtePilz
2fa1146af5 Properly destroy placed blocks on the end platform (#11292) 2024-08-25 21:19:40 +02:00
Jake Potrebic
0481feec57 Deprecate API relating to menu title changes (#11309) 2024-08-25 11:56:17 -07:00
Jake Potrebic
43f2d628d5 Fix despawn ranges by defaulting to an ellipsoid shape (#11312) 2024-08-25 11:26:33 -07:00
Newwind
4a0660bd59 Remove set damage lootable item function from compasses (#11317) 2024-08-25 18:52:12 +01:00
Newwind
acf0b2d2f1 Fix incorrect timestamp in region file header recalculation (#11318) 2024-08-25 18:42:15 +01:00
Lulu13022002
403db04ae4 Prevent duplicate pickup event for piglins (#11322) 2024-08-25 19:27:31 +02:00
Janet Blackquill
5f317598d4 Ensure MaterialChoice materials are items (#11325) 2024-08-25 13:20:10 -04:00
Nassim Jahnke
50b7f46507 Update spark-paper 2024-08-24 10:52:38 +02:00
roro1506HD
80501c393a Fix structure check API (#11307)
* Fix structure check API

* Use CraftStructure#bukkitToMinecraft

* Fixed spelling mistake on CraftStructure class name
2024-08-21 03:27:33 +02:00
Jake Potrebic
01e05f9751 Fix SculkBloomEvent firing for block entity loading (#11306) 2024-08-19 14:28:03 -07:00
Nassim Jahnke
4034116f05 Fixup config parsing 2024-08-19 12:47:50 +02:00
DerEchtePilz
d80cafec08 [ci skip] Fix JavaDocs for HeightMap#MOTION_BLOCKING_NO_LEAVES (#11291) 2024-08-19 11:48:20 +02:00
Anthony J. Halliday
3ab4933ea3 Allow server administrators to disable book size checks (#10457) 2024-08-19 05:46:39 -04:00
kokiriglade
9921a197e7 Add getWorld method that uses adventure Key (#11199) 2024-08-19 10:41:55 +01:00
Nassim Jahnke
5703e6c6d8 [ci skip] Clean up book limits patch (#11297) 2024-08-19 11:33:17 +02:00
Spottedleaf
9804f7ffe1 Use player file, not directory, when checking for offline player data
When trying to fall back to offline player data in onlide mode,
we need to use the player file. This fixes a mistake during
update where 'file' was used, but the new code uses 'file1'
for the player file.
2024-08-18 15:32:25 -07:00
Spottedleaf
9ceadbe9f1 Fix entity limit patch deleting unnecessary entities
We need to continue the save loop, not break from it
when a limit is reached.
2024-08-18 11:14:39 -07:00
SoSeDiK
1f6969e350 Allow getting/setting the sign's editor uuid (#10637)
* Allow getting/setting the sign's editor uuid

* rebased

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-08-18 00:36:27 +03:00
Tamion
0f622bb732 Fix CraftBukkit drag system (#10703) 2024-08-17 23:31:38 +02:00
Isaac - The456
659f0f2fd0 Fix Selector Arguments not working with permission (#11286) 2024-08-17 22:20:21 +01:00
Lulu13022002
6da54bd440 Leashable API (#10961) 2024-08-17 23:17:18 +02:00
Jake Potrebic
0df31bdeb3 Add even more Enchantment API (#11115) 2024-08-17 13:58:36 -07:00
Lulu13022002
0a041c951d Update item data sanitization (#11227) 2024-08-17 22:30:21 +02:00
Jake Potrebic
c10949d863 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11284)
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:
4068c6aa PR-1053: Change docs for max power in FireworkMeta
6b3c241b SPIGOT-7783, SPIGOT-7784, PR-1051: Add Trial Vault & Spawner event API
5fe300ec PR-1052: Fix broken links and minor improvement for checkstyle.xml

CraftBukkit Changes:
7548afcf2 SPIGOT-7872: Fix crash with event-modified teleports
93480d5d6 SPIGOT-7868, PR-1463: Fix default and max power in FireworkMeta
5060d1a84 SPIGOT-7783, SPIGOT-7784, PR-1460: Add Trial Vault & Spawner event API
11dfcae71 PR-1462: Fix broken links and minor improvement for checkstyle.xml

Spigot Changes:
ca581228 Rebuild patches
2024-08-17 12:39:11 -07:00
Tamion
da11f251cd Add Configuration for vertical Despawn Ranges (#11279) 2024-08-17 21:13:10 +02:00
Shane Freeder
d0221fe540 Migrate ArmorStand meta to using entity tag (#11107) 2024-08-16 23:30:11 +01:00
Lulu13022002
f011be78fc Implement more methods for horse inventories (#11147) 2024-08-17 00:27:47 +02:00
Lulu13022002
d44aa26792 Handle custom registry elements properly (#11230)
* Handle custom registry elements properly

* update error message

Datapack made painting variant support is added in https://github.com/PaperMC/Paper/pull/11244

* change msg for art conversion

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-08-16 23:21:35 +02:00
Lulu13022002
0c47bf87a2 Re-implement portalCreateRadius world config (#11267) 2024-08-16 22:59:46 +02:00
Mart
d0fb407064 Allow skipping of world symlink validation (#11250) 2024-08-16 16:36:30 -04:00
Bjarne Koll
8ffc76800a [ci-skip] Revert "Add Configuration for vertical Despawn Ranges (#10440)" (#11278)
This reverts commit 258b830f5e.
2024-08-16 22:33:52 +02:00
Tamion
258b830f5e Add Configuration for vertical Despawn Ranges (#10440) 2024-08-16 22:29:53 +02:00
Abel
c1b2a34de3 Fix indestructable light blocks (#11275)
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2024-08-16 22:13:00 +02:00
Lulu13022002
42dae8d83e Fix scanForLegacyEnderDragon world config (#11262) 2024-08-16 21:45:07 +02:00
Spottedleaf
1d4d2dc5f9 Apply optimise collision checking in move packet handling patch 2024-08-16 06:56:13 -07:00
Lulu13022002
fee33bd1e2 Fix NPE for PlayerPostRespawnEvent#getRespawnedLocation (#11268) 2024-08-16 09:20:57 +02:00
Lulu13022002
815149208d Fix disableEndCredits world config (#11261) 2024-08-14 21:26:38 +02:00
hyperdefined
fe4996a080 Fix TooltipContext.create being wrong(#11254)
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-08-14 08:39:45 -04:00
Nassim Jahnke
f05a7d0a96 Improve standard messenger logging 2024-08-12 18:42:08 +02:00
Jake Potrebic
23550ec960 Fix BasicCommand suggestion arg count (#11241) 2024-08-12 00:40:39 -07:00
hyperdefined
dada30ee8a Fix setSendViewDistance's return (#11247) 2024-08-12 03:27:27 -04:00
Jake Potrebic
0625ce9d09 [ci skip] Fix Effect javadocs (#11182) 2024-08-11 15:35:45 -07:00
Lulu13022002
4c7b6f5c05 Remove arbitrary book page limit (#11228) 2024-08-12 00:30:23 +02:00
Newwind
794e2754b5 Configuration for horizontal-only item merging (#11219) 2024-08-11 23:16:20 +01:00
Jake Potrebic
3cb3616012 Re-add patches for can-place/can-destroy API (#11238)
* Re-add patches for can-place/can-destroy API

This API is all deprecated for removal and has to be replaced
as the structure of it has too radically changed

* update patches

* add link to MaterialRerouting

* Deprecation

---------

Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2024-08-11 13:51:37 -07:00
Jake Potrebic
b366872963 Fix teleport event getTo returning null (#11239) 2024-08-11 13:42:39 -07:00
Jake Potrebic
e574dc326d Correctly check enchants for ItemStack#damage (#11240) 2024-08-11 13:27:24 -07:00
Lulu13022002
e0bec73f14 Fix wrong spawn reason for trial spawners (#11229) 2024-08-11 00:19:54 +02:00
Lulu13022002
5e68331cc3 Fix tag key generator output inconsistencies (#11218)
* Fix tag key generator output inconsistencies

* use NonNull instead of NotNull for generated api

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-08-11 00:11:57 +02:00
Lulu13022002
1569c093c5 Fix CraftMetaShield equality (#11232) 2024-08-10 15:08:00 +02:00
Nassim Jahnke
ec79de82ca Update to 1.21.1 2024-08-10 12:24:38 +02:00
Nassim Jahnke
f117e53094 Check shooter in configurable projectile relative velocity patch 2024-08-10 11:55:08 +02:00
Joo200
bc48955246 Fix source of knockback for spigot events (#11176) 2024-08-09 22:57:55 +02:00
Bjarne Koll
b819030e31 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11197)
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:
2ec53f49 PR-1050: Fix empty result check for Complex Recipes
10671012 PR-1044: Add CrafterCraftEvent
4d87ffe0 Use correct method in JavaDoc
ae5e5817 SPIGOT-7850: Add API for Bogged shear state
46b6d445 SPIGOT-7837: Support data pack banner patterns
d5d0cefc Fix JavaDoc error
b3c2b83d PR-1036: Add API for InventoryView derivatives
1fe2c75a SPIGOT-7809: Add ShieldMeta

CraftBukkit Changes:
8ee6fd1b8 SPIGOT-7857: Improve ItemMeta block data deserialization
8f26c30c6 SPIGOT-7857: Fix spurious internal NBT tag when deserializing BlockStateMeta
759061b93 SPIGOT-7855: Fire does not spread or burn blocks
00fc9fb64 SPIGOT-7853: AnvilInventory#getRepairCost() always returns 0
7501e2e04 PR-1450: Add CrafterCraftEvent
8c51673e7 SPIGOT-5731: PortalCreateEvent#getEntity returns null for nether portals ignited by flint and steel
d53d0d0b1 PR-1456: Fix inverted logic in CraftCrafterView#setSlotDisabled
682a678c8 SPIGOT-7850: Add API for Bogged shear state
fccf5243a SPIGOT-7837: Support data pack banner patterns
9c3bd4390 PR-1431: Add API for InventoryView derivatives
0cc6acbc4 SPIGOT-7849: Fix FoodComponent serialize with "using-converts-to" using null
2c5474952 Don't rely on tags for CraftItemMetas
20d107e46 SPIGOT-7846: Fix ItemMeta for hanging signs
76f59e315 Remove redundant clone in Dropper InventoryMoveItemEvent
e61a53d25 SPIGOT-7817: Call InventoryMoveItemEvent for Crafters
894682e2d SPIGOT-7839: Remove redundant Java version checks
2c12b2187 SPIGOT-7809: Add ShieldMeta and fix setting shield base colours

Spigot Changes:
fb8fb722 Rebuild patches
34bd42b7 SPIGOT-7835: Fix issue with custom hopper settings
2024-08-09 22:05:50 +02:00
Nassim Jahnke
35fd8fb960 Check for block type in SculkSensorBlock#canActivate 2024-08-07 14:34:12 +02:00
metabrix
f8f2bd7db7 Fix wrong assumption about locale being null in the login phase (#11204)
Fixes #11203
2024-08-06 00:02:19 +05:00
Nassim Jahnke
36c41877b6 Remove chunk unload trace debug
The issue the patch was initially added for has already been fixed and filling stacktraces can be expensive
2024-08-05 19:57:34 +02:00
Spottedleaf
842831a3cf ConcurrentUtil: Fix concurrent long map resize chain pull function
The function assumed that the current resize chain pointed to
the previous table, when in fact it pointed to the current table.

The function is supposed to restore the resize chain to the previous
table, previous increment, and previous index + new increment.
2024-08-01 16:55:33 -07:00
Spottedleaf
bad7a89384 Make loadChunksForMoveAsync use new chunk system load calls
This is to allow the call to work properly when on Folia,
as Folia does not have a main thread.
2024-07-30 19:50:14 -07:00
Jason Penilla
86d0c737cc Preserve command node when re-registering modern commands through old API (#11184)
* Preserve command node when re-registering modern commands through old API

* make fix more targeted

mainly because it didn't work for vanilla commands :)
2024-07-30 11:42:55 -07:00
Jason Penilla
301caeb6d0 Allow plugin aliases to override vanilla commands (#11186)
fixes #11035
2024-07-30 11:28:05 -07:00
Spottedleaf
5bb7bd0f66 Move TickThread changes from Moonrise patch to MCUtils
The common changes from Moonrise should be entirely in MCUtils
2024-07-30 05:32:20 -07:00
Shane Freeder
c58d918886 Don't entirely die just because a plugin jar was bad 2024-07-29 16:54:46 +01:00
Shane Freeder
c2b2de43cf Shutdown L4J cordially if the server stops before it's even started (#11172)
primarily, this allows us to ensure that appenders are flushed, console, log files
before the JVM exits to avoid issues such as error messages disappearing
2024-07-29 16:10:53 +01:00
Spottedleaf
e9a408f93f Add mob bucket items to item id to entity map in DataConverter
Mojang missed these in their mapping. Since the entity data
is used when spawning the bucketed mob, we need to have these
inside the id map to ensure that the entity data is converted
correctly if the entity id is missing.
2024-07-28 17:36:53 -07:00
Spottedleaf
78866a364d Do not allow chunk unloading outside of the regular tick loop
Allowing chunk loading to occur at any point via purgeUnload()
introduces possible undesirable behavior to occur recursively
inside the chunk system.
2024-07-28 16:18:25 -07:00
Spottedleaf
ce8b79d47e Null check tracker in Entity#resendPossiblyDesyncedEntityData
Accidentally dropped this check last commit. It is possible
that this is called while the entity is not tracked.
2024-07-28 15:49:38 -07:00
Spottedleaf
3badc8385a Copy missed changes to chunk system from Folia 2024-07-28 15:34:07 -07:00
Spottedleaf
08e9cfb799 Remove Entity tracker field
Now the only tracker field is from the entity tracker
optimisations.
2024-07-28 15:28:28 -07:00
Jake Potrebic
d34db05237 Add argument for FinePosition to brig API (#11094) 2024-07-28 11:23:18 -07:00
powercas_gamer
5257a97fb3 Fix Owen's typos (#11179) 2024-07-28 19:58:57 +02:00
Tamion
b624a6526d Fix PickupStatus getting reset (#11154) 2024-07-27 16:37:51 +02:00
Newwind
fff73fa4c4 Make max interaction range configurable (#11164)
The server validates incoming interaction packets by ensuring the player
sending them is inside their interaction range. For this, the server adds
a magic value, by default 1.0, to the original interaction range to
account for latency issues.

This value however may be too low in high latency environments.
The patch exposes a new configuration option to configure said value.
2024-07-27 13:18:16 +01:00
Shane Freeder
7c88512287 Bump MCUtils#asyncExecutor core size
Long ago we discovered that the default thread pools would not increase
the number of threads running the pool until queue addition failed.
Bumping the core size mitigates an issue with spark-paper, and in general,
keeping async threads around generally beats having to spin new ones
everytime we want to execute a periodic async task.
2024-07-26 13:43:48 +01:00
Lulu13022002
61ad933f4d Fix a couple of ItemMeta related NPEs (#11149) 2024-07-23 10:11:00 +02:00
Lulu13022002
1f88247729 Fix horse inventories indices (#11139) 2024-07-22 15:17:25 +02:00
Tamion
cb5526fec2 Fix EntityUnleashEvent cancellation on distance cause (#11131) 2024-07-21 12:33:37 +02:00
Riley Park
e09fea294f Deprecate more Timings things for removal (#11126) 2024-07-20 19:40:41 -07:00
Riley Park
1ef619aa34 Update the bundled spark version 2024-07-20 13:56:37 -07:00
Riley Park
5ff87e597f Properly lookup plugin classes when looked up by spark
fixes #11124
2024-07-20 13:00:29 -07:00
Riley Park
de456328de Improve server startup logging (#11110)
* Improve server startup logging

* Add plugin info at startup

---------

Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2024-07-20 10:36:52 -07:00
Riley Park
574485b5bd Move configuration option to a system property 2024-07-20 10:14:55 -07:00
Riley Park
bb682e9548 Bundle spark (#11093) 2024-07-20 09:35:39 -07:00
Jason Penilla
2b8d0d6df8 Adjust done message again (#11118)
what paper now shows as level loading time is the time displayed by vanilla or spigot in the 'done' message

the time in the done message is now the actual time since the servers Main class was initialized
2024-07-19 12:36:09 -07:00
Bjarne Koll
71e3c51538 Make CraftComplexRecipe extend CraftingRecipe (#11114) 2024-07-19 19:29:31 +02:00
Nassim Jahnke
66dc0ac979 Call PlayerChunkUnloadEvent 2024-07-19 13:50:38 +02:00
Nassim Jahnke
40dfd62e54 Fixup startup time log message 2024-07-19 13:38:43 +02:00
Nassim Jahnke
203314faf8 Split rewriting flag into paper.disableOldApiSupport and paper.disablePluginRemapping (#11108) 2024-07-19 13:08:08 +02:00
Bjarne Koll
4c38b7496b Add CrafterCraftEvent (#11082)
Ports the proposed CrafterCraftEvent proposed in an
open upstream PR.

See: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/1044
2024-07-19 11:21:26 +02:00
Jason Penilla
870239b8a4 Add total time to done message (#11109)
* Add total time to done message

Previously it would only show the world load time which is misleading

* Add comments
2024-07-18 15:33:14 -07:00
Nassim Jahnke
dc136446fb Even more cleanup of mcutil patch 2024-07-18 16:50:16 +02:00
granny
0b2291042a Re-add missing chunk event calls (#11104) 2024-07-18 04:34:34 -07:00
Nassim Jahnke
30285e7121 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11102)
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:
3a3bea52 SPIGOT-7829: Increase maximum outgoing plugin message size to match Vanilla intention
5cd1c8cb SPIGOT-7831: Add CreatureSpawnEvent.SpawnReason#POTION_EFFECT
a8e278f0 SPIGOT-7827: Sync EntityPortalEvent with PlayerPortalEvent since non-players can now create portals
53729d12 Remove spurious ApiStatus.Internal annotation
b9f57486 SPIGOT-7799, PR-1039: Expose explosion world interaction in EntityExplodeEvent and BlockExplodeEvent
7983b966 PR-1029: Trial changing a small number of inner enums to classes/interfaces to better support custom values

CraftBukkit Changes:
403accd56 SPIGOT-7831: Add CreatureSpawnEvent.SpawnReason#POTION_EFFECT
812761660 Increase outdated build delay
bed1e3ff6 SPIGOT-7827: Sync EntityPortalEvent with PlayerPortalEvent since non-players can now create portals
2444c8b23 SPIGOT-7823: Suspicious sand and gravel material are not marked as having gravity correctly
aceddcd0b SPIGOT-7820: Enum changes - duplicate method name
a0d2d6a84 SPIGOT-7813: Material#isInteractable() always returns false
8fd64b091 SPIGOT-7806: Handle both loot and inventory item drop behaviour in PlayerDeathEvent
a4ee40b74 SPIGOT-7799, PR-1436: Expose explosion world interaction in EntityExplodeEvent and BlockExplodeEvent
082aa51c5 PR-1424: Trial changing a small number of inner enums to classes/interfaces to better support custom values
66e78a96b SPIGOT-7815: Consider EntityDamageEvent status for Wolf armor damage

Spigot Changes:
5bbef5ad SPIGOT-7834: Modify max value for generic.max_absorption
2024-07-18 10:13:20 +02:00
Jake Potrebic
a507e91bb3 fix exact choice shapeless recipes (#10973) 2024-07-17 12:48:31 -07:00
Spottedleaf
f9a133bd33 Log throwable when failing to save chunk/poi/entity data 2024-07-17 11:48:24 -07:00
Spottedleaf
e43b9191b2 Finish chunk tick iteration optimisation port from Moonrise 2024-07-17 11:33:13 -07:00
Spottedleaf
077f411288 Remove unused chunk system hooks in MCUtils 2024-07-17 11:08:28 -07:00
Spottedleaf
cc8d4390d4 Remove Moonrise utils to MCUtils, remove duplicated/unused utils 2024-07-17 10:24:53 -07:00
Spottedleaf
e2a85cf6d9 Optimise chunk tick checking during chunk tick
We don't need to check for this with the chunk system, as
ticking chunks are actually guaranteed to ticking. Additionally,
ticking chunks may only become non-ticking during the chunk holder
manager tick - which will not happen during chunk ticking.
2024-07-17 07:43:49 -07:00
Spottedleaf
efa4155840 Fix priority scheduling logic
This resolves sync loads not being properly prioritised.
2024-07-17 07:39:30 -07:00
Riley Park
e922317eaa Disable timings by default (#11095) 2024-07-16 17:33:40 -07:00
Jake Potrebic
412a28a37a Don't store removed components in multiple places (#11091) 2024-07-16 16:39:57 -07:00
Jake Potrebic
2a8b311dfb distinguish between null and empty map in API (#10829) 2024-07-16 11:36:07 -07:00
Tamion
ad2de918bf Fire EntityChangeBlockEvent for weaving potion effect (#11087) 2024-07-16 10:15:18 +02:00
Jakub Zacek
9e17c2c800 Add OMINOUS_ITEM_SPAWNER SpawnReason (#10897) 2024-07-15 23:35:51 +02:00
Spottedleaf
e3d92c508f Do not try to stop main thread during watchdog shutdown
In Java 21, Thread#stop is no longer implemented and wiill throw
an exception when called. As a result, we simply cannot halt
the main thread during shutdown anymore.
2024-07-15 12:46:23 -07:00
Spottedleaf
043559513c Apply automatic regionfile header recalculation patch 2024-07-15 12:20:47 -07:00
Spottedleaf
900c617ae5 Apply incremental player/level saving patch 2024-07-15 11:57:56 -07:00
Spottedleaf
479ca6ef4d Port random ticking optimisation from Moonrise 2024-07-15 11:11:04 -07:00
Spottedleaf
e08de25a2a Avoid collision shapes outside world border in findFreePosition
This is to correctly adhere to Vanilla behavior.
2024-07-15 09:56:17 -07:00
Lulu13022002
084923b9ac Call PlayerLaunchProjectileEvent for wind charge (#10911) 2024-07-15 17:07:07 +02:00
Jake Potrebic
14b789b68a Add ItemType#getItemRarity (#11049) 2024-07-15 07:38:20 -07:00
powercas_gamer
5e9272f83c Add Plugin#getDataPath (#11080) 2024-07-15 14:07:17 +02:00
Tamion
137019f867 Fix HelpCommand searching (#11066)
Prevent a IOB exception when querying topic
suggestions on query string `/`.

Additionally hide help topics indices if no topics
are visible to the player requesting them.
2024-07-15 12:42:10 +02:00
Malfrador
656cc3915f Add AttributeModifier constructor without EquipmentSlotGroup (#11079) 2024-07-15 12:31:41 +02:00
Lulu13022002
b8af72fa88 Don't require author and title to be set on signed book meta (#11068) 2024-07-14 15:33:52 +02:00
Nassim Jahnke
c1d9a67e3f Add default canUse and permission methods to BasicCommand (#11047) 2024-07-14 14:04:38 +02:00
Nassim Jahnke
13940e5a97 Make watchdog thread extend TickThread again 2024-07-14 13:58:27 +02:00
Spottedleaf
7c3194af85 Update last chunk position in findSupportingBlock
Fixes fetching chunks needlessly multiple times.

Thanks Lulu13022002 for pointing this out
2024-07-13 11:44:52 -07:00
Bjarne Koll
1b20e12355 Bulk bugfixes for itemstack damage API (#11063)
A general set of bugfixes for itemstack damage related logic.

1. Prevent NPE when calling deprecated ItemStack#getMaxItemUseDuration()
2. Do not apply enchantments when damaging items via API
3. Do not error when passing a null equipment slot to hurtAndBreak
4. Correctly call PlayerItemBreakEvent
2024-07-12 20:47:08 +02:00
Nassim Jahnke
32d0bfcdea Readd async saveddata io 2024-07-12 17:58:54 +02:00
Bjarne Koll
cb518f9878 Only skip damage tick if damage is unmodified zero (#11058)
Only skip the damage tick logic on player entities if the original
damage was zero and was not modified by plugins down the line.

This way all the following three scenarios trigger the damage tick

  a) vanilla damage was 0, plugin set it to non zero
  b) vanilla damage was non zero, plugin did not modify it
  c) vanilla damage was non zero, plugin set it to zero.

Regarding case c, the argument here is that EntityDamageEvent#setDamage
should not modify the damage tick logic.
2024-07-12 09:47:50 +02:00
Nassim Jahnke
be464edaf2 Add light block to indestructible block list 2024-07-12 09:24:37 +02:00
Shane Freeder
12356fbe77 Fix explosions calculation getting stuck (#11061)
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
2024-07-12 08:16:03 +01:00