Commit graph

8999 commits

Author SHA1 Message Date
Spottedleaf
45ae3a360b Copy missing diff from old chunk system patch
Fixes:
- EntitiesLoadEvent/EntitiesUnloadEvent not firing
- Chunks not saving properly in a lot of cases
2024-06-19 09:27:15 -07:00
Spottedleaf
311fbf4a30 Re-add fixlight command 2024-06-19 08:37:12 -07:00
Jason Penilla
2475b329fa Add ticket for chunk load in isChunkGenerated 2024-06-18 21:15:20 -07:00
Jason Penilla
15c0e90d6e Execute chunk tasks while waiting for chunk load in isChunkGenerated
this shouldn't be needed as we are requesting EMPTY status, however there is a deeper issue that we will just work around for now

fixes #10916
2024-06-18 21:04:13 -07:00
Jason Penilla
6ae5176a52 Add missing null check to getFullChunkIfLoaded
fixes #10915
2024-06-18 18:27:50 -07:00
Jason Penilla
acc349cf7d Remove getUnloadingChunkHolder check
It always returns null now. So it could NPE and is not useful.
2024-06-18 12:51:40 -07:00
Jason Penilla
aaf37cb47d Fix CraftWorld#isChunkGenerated
The upstream implementation is returning true for non-full chunks.

This fix is not ideal since the new chunk system doesn't have a region file/chunk status patch. May want to be revisited before a non-experimental release.
2024-06-18 12:44:07 -07:00
Nassim Jahnke
97bd52887e Use ItemStack.empty() when air is passed into constructor 2024-06-18 15:31:30 +02:00
Bjarne Koll
8d4decb590 Correct duplicate attribute check (#10901)
Brackets got lost during the update, leading to an incorrect
precondition call.
2024-06-18 11:11:14 +02:00
Jake Potrebic
59da9d1a80 Fix NPE for Jukebox#setRecord
Fallback to the global registry if no level exists
Fixes #10899
2024-06-17 17:42:48 -07:00
Emilia Kond
ffa51cc8b0 [ci skip] Fix javadoc mistake in EnchantmentRegistryEntry.Builder (#10898)
The javadoc for EnchantmentRegistryEntry.Builder accidentally refers to
GameEventRegistryEntry, which is a different buildable registry entry.
2024-06-18 00:54:49 +03:00
willkroboth
7887bddbae Fix hasFiredAsync parameter when AsyncPlayerSendCommandsEvent is called (#10896) 2024-06-17 21:16:55 +02:00
Jake Potrebic
70f3730d25 Delegate ItemStack (#10852) 2024-06-17 12:12:42 -07:00
Nassim Jahnke
27a9efdca5 Make chunk system loggers calm down a bit 2024-06-17 13:43:21 +02:00
Nassim Jahnke
08a87667f7 Add back improved watchdog support patch 2024-06-17 13:36:43 +02:00
Jake Potrebic
a9fdf73f2e make EntityPortalReadyEvent#setTargetWorld work again 2024-06-16 15:48:38 -07:00
Jake Potrebic
1862266320 remove remaining reference to 'pgive' 2024-06-16 15:38:59 -07:00
Jake Potrebic
bb6b0b4cb1 Enchantment and GameEvent Registry builders (#10889)
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2024-06-16 15:00:12 -07:00
Jason Penilla
2e8cf94dd1 Update ChunkMap#distanceManager mapping patch 2024-06-16 14:50:57 -07:00
Nassim Jahnke
e816087107 Fix legacy cb version in remapper 2024-06-16 23:23:50 +02:00
Spottedleaf
50fedea85f Fix implementations of ChunkHolder#getChunkIfPresent
Implementations for ChunkStatuses below FULL are supposed to always
return ProtoChunk instances. However, since we used the last completed
status, it could return LevelChunk.

To resolve this, follow Vanilla behavior of tracking chunk
completions by status and replace old ProtoChunk statuses with
ImposterProtoChunk when the chunk generates to FULL.

Additionally, implement an optimisation for retrieving full chunks
by storing a map of pos -> LevelChunk. This requires only a simple
map lookup to occur for full chunks which are loaded.
2024-06-16 14:09:44 -07:00
Jake Potrebic
25c3a98398 Registry Modification API (#10893)
* Registry Modification API

* some fixes

* even more fixes
2024-06-16 12:39:59 -07:00
Nassim Jahnke
c675152a56 Fix getAddress connection check 2024-06-16 21:31:39 +02:00
Jake Potrebic
bff551166c call EntityDamageItemEvent for thorns 2024-06-16 09:47:53 -07:00
Bjarne Koll
07e821664d Update Wither#canTravelThroughPortals 2024-06-16 18:04:11 +02:00
Bjarne Koll
d04e9fafa4 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:
2b4b6d14 PR-1023: Convert InventoryView to interface

CraftBukkit Changes:
68603b1c1 Use expanded interaction ranges for traced interact events
eae9f760c PR-1414: Convert InventoryView to interface
ee9eafe67 Fix Implementation for DamageSource#isIndirect for internal custom causing entity
2024-06-16 17:21:14 +02:00
Jake Potrebic
35a678ddb3 update 'improve mass craft perf' patch 2024-06-16 08:08:06 -07:00
Jakub Zacek
b6b5a57b8b Add Adventure API to ServerLinks (#10891) 2024-06-16 13:54:38 +02:00
Nassim Jahnke
98682757de Remove fully dropped patches 2024-06-16 13:14:53 +02:00
Nassim Jahnke
78a67f00ea Remove bad server.scheduleOnMain disconnect calls from old patches
The new behavior of disconnect to block the current thread until the disconnect succeeded is better than throwing it off to happen at some point
2024-06-16 12:56:00 +02:00
Nassim Jahnke
fc90ea0624 Add back more patches 2024-06-16 12:47:57 +02:00
Bjarne Koll
3753d8b292 De-deprecate BlockData#getDestroySpeed 2024-06-16 12:44:22 +02:00
Yannick Lamprecht
f594b47eda address compile and test issue (#10890) 2024-06-16 11:47:44 +02:00
Spottedleaf
f63023a6ac Fix NPE in V3808
The armor items may not exist, so we need to null check it.
2024-06-15 22:57:01 -07:00
Owen1212055
c4a1f15d70 Restore functionality to sand dupe setting 2024-06-15 22:04:02 -04:00
Owen1212055
0410d79c1d Owen fixing stuff!!! 2024-06-15 21:43:06 -04:00
Jake Potrebic
046bbf8a74 add some generated typed/tag keys 2024-06-15 15:52:14 -07:00
Spottedleaf
f679845d59 Remove unnecessary changes from chunk status fix 2024-06-15 15:31:04 -07:00
Bjarne Koll
a2c7a9b490 Deprecate BlockData#getDestroySpeed for removal
The method sadly is not usable in 1.21 without a player as all of an
enchantments attribtue modifiers rely on a base value supplied by a
player. The method could only offer a rough estimate based on some
default values, however a better method for this should be added down
the line rather than trying to force such logic into the existing one.
2024-06-16 00:19:10 +02:00
Bjarne Koll
26f246b908 Properly forward DispenseEvent #getItem to saddle
Correctly use the DispenseEvent's #getItem ItemStack when placing the
saddle on entities during a dispense behaviour instead of the original
stack.
2024-06-16 00:01:55 +02:00
Bjarne Koll
cffcda2bc7 Configurable damage tick when blocking with shield (#10877)
A long standing bug in spigot and its derivatives was the fact that
players taking damage while blocking with a shield would not receive
invulnerability, while they do in vanilla.

This enabled the pvp technique of disabling a shield and immediately
attacking again to knock a player into the air.
While upstream fixed this and properly aligned itself with vanilla
damage logic (in this specific case) changing such long standing
behaviour has some downsides.

To allow players used to this specific bug to still use it, this patch
introduces a configuration option to re-introduce said bug.
As there is no easy way to *only* re-add this bug, the option is found
in the unsupported section as it may introduce other damage related
disparity from vanilla.
2024-06-15 23:09:34 +02:00
Aya
87aea64a44 Add back RecipeIterator fixes patch (#10887) 2024-06-15 20:49:08 +01:00
Jake Potrebic
80cb0a621b correctly change enchantment registry to a 'delayed' version 2024-06-15 12:04:06 -07:00
Nassim Jahnke
3a74801788 Fix max chunk status checks 2024-06-15 19:57:59 +02:00
Nassim Jahnke
b81fffb934 Add back more optimization patches 2024-06-15 19:24:11 +02:00
Bjarne Koll
128085ba3e Improve enchantWithLevels logic
Previously would stream and optionally filter out all entries in the
enchantment registry.
Moves it to using the empty optional if treasure is allowed, leaving the
logic to EnchantmentHelper.
2024-06-15 19:08:11 +02:00
Nassim Jahnke
967ee0c7b1 Merge remote-tracking branch 'origin/dev/1.21' into dev/1.21 2024-06-15 18:52:19 +02:00
Bjarne Koll
22595ec4c0 Revert DamageSource#getCausingEntity to vanilla 2024-06-15 18:39:55 +02:00
Nassim Jahnke
efb91589dc 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:
e2160a18 Make MapCursor#type not depends on deprecated values

CraftBukkit Changes:
6ce172642 SPIGOT-7761: Ender pearl does not damage or spawn endermites
f5a63f734 SPIGOT-7759: Chunk not there when requested in ChunkUnloadEvent
28287259c Remove unused import
eb9a7dde0 SPIGOT-7757: Cannot set item in Stonecutter Inventory
f8be9d752 Move deserialized removed unhandled tags to dedicated removedTags
a7e576186 Fix potential mutability issue with CraftMetaItem copy constructor
995885452 SPIGOT-7741: Vanilla ItemComponent in commands can't remove components
9ef69aa0b PR-1284: Move ItemType <-> ItemMeta linking to a centralized place
3e82eafbe PR-1420: Fix DirectEntity and CausingEntity Damager for Creepers ignited by Player
c23daa71f SPIGOT-7751: Fix crash caused by arrows from trial spawners
Make MapCursor#type not depends on deprecated values
SPIGOT-7761: Ender pearl does not damage or spawn endermites
2024-06-15 18:28:18 +02:00
Ghast
4c472e3401 Fix ItemMeta#removeEnchantments (#10886) 2024-06-15 17:26:55 +02:00