Update patches to latest 1.21.4 #1

Merged
Chaoscaot merged 242 commits from update/1.21.4 into main 2025-04-23 22:27:11 +02:00
21 changed files with 188 additions and 321 deletions
Showing only changes of commit 486e521105 - Show all commits

View File

@ -1,5 +1,14 @@
--- a/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java --- a/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java
+++ b/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java +++ b/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java
@@ -123,7 +_,7 @@
public static Codec<VibrationSystem.Data> CODEC = RecordCodecBuilder.create(
instance -> instance.group(
VibrationInfo.CODEC.lenientOptionalFieldOf("event").forGetter(data -> Optional.ofNullable(data.currentVibration)),
- VibrationSelector.CODEC.fieldOf("selector").forGetter(VibrationSystem.Data::getSelectionStrategy),
+ VibrationSelector.CODEC.optionalFieldOf("selector").xmap(o -> o.orElseGet(VibrationSelector::new), Optional::of).forGetter(VibrationSystem.Data::getSelectionStrategy), // Paper - fix MapLike spam for missing "selector" in 1.19.2
ExtraCodecs.NON_NEGATIVE_INT.fieldOf("event_delay").orElse(0).forGetter(VibrationSystem.Data::getTravelTimeInTicks)
)
.apply(
@@ -214,7 +_,14 @@ @@ -214,7 +_,14 @@
return false; return false;
} else { } else {