aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0809-fix-MapLike-spam-for-missing-key-selector.patch
diff options
context:
space:
mode:
authorNassim Jahnke <[email protected]>2024-12-05 11:18:29 +0100
committerNassim Jahnke <[email protected]>2024-12-05 12:20:56 +0100
commite4e24f3335609b38f460ced71d18babcf11bf9cb (patch)
tree51880d664b3444ce26d6f8cdeb3b8219e5616fca /patches/server/0809-fix-MapLike-spam-for-missing-key-selector.patch
parentc54c062e6ff742445bf7749c84106ca67090172d (diff)
downloadPaper-e4e24f3335609b38f460ced71d18babcf11bf9cb.tar.gz
Paper-e4e24f3335609b38f460ced71d18babcf11bf9cb.zip
Move around patches again
Diffstat (limited to 'patches/server/0809-fix-MapLike-spam-for-missing-key-selector.patch')
-rw-r--r--patches/server/0809-fix-MapLike-spam-for-missing-key-selector.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/patches/server/0809-fix-MapLike-spam-for-missing-key-selector.patch b/patches/server/0809-fix-MapLike-spam-for-missing-key-selector.patch
new file mode 100644
index 0000000000..2bd3b889f1
--- /dev/null
+++ b/patches/server/0809-fix-MapLike-spam-for-missing-key-selector.patch
@@ -0,0 +1,19 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jake Potrebic <[email protected]>
+Date: Wed, 14 Jun 2023 13:17:40 -0700
+Subject: [PATCH] fix MapLike spam for missing key 'selector'
+
+
+diff --git a/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java b/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java
+index 8c8c16ce53f5bdf88274cb80767decf0a2612637..0efe935e1f0a25bff95cdb849117b222ae8c603e 100644
+--- a/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java
++++ b/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java
+@@ -353,7 +353,7 @@ public interface VibrationSystem {
+ public static Codec<VibrationSystem.Data> CODEC = RecordCodecBuilder.create((instance) -> {
+ return instance.group(VibrationInfo.CODEC.lenientOptionalFieldOf("event").forGetter((vibrationsystem_a) -> {
+ return Optional.ofNullable(vibrationsystem_a.currentVibration);
+- }), VibrationSelector.CODEC.fieldOf("selector").forGetter(VibrationSystem.Data::getSelectionStrategy), ExtraCodecs.NON_NEGATIVE_INT.fieldOf("event_delay").orElse(0).forGetter(VibrationSystem.Data::getTravelTimeInTicks)).apply(instance, (optional, vibrationselector, integer) -> {
++ }), VibrationSelector.CODEC.optionalFieldOf("selector").xmap(o -> o.orElseGet(VibrationSelector::new), Optional::of).forGetter(VibrationSystem.Data::getSelectionStrategy), ExtraCodecs.NON_NEGATIVE_INT.fieldOf("event_delay").orElse(0).forGetter(VibrationSystem.Data::getTravelTimeInTicks)).apply(instance, (optional, vibrationselector, integer) -> { // Paper - fix MapLike spam for missing "selector" in 1.19.2
+ return new VibrationSystem.Data((VibrationInfo) optional.orElse(null), vibrationselector, integer, true); // CraftBukkit - decompile error
+ });
+ });