mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-12 19:30:42 +01:00
Re-add droped MapLike spam fix (#11917)
This commit is contained in:
parent
9f90b4c324
commit
486e521105
@ -1,5 +1,14 @@
|
||||
--- a/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 @@
|
||||
return false;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user