diff options
author | booky10 <[email protected]> | 2023-11-04 20:20:01 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2023-11-04 20:20:01 +0100 |
commit | f78d7ce8ffb7e4b6fd5ee256f5e3678ea04fd807 (patch) | |
tree | 8e7abee5129e15a919630824c4f194a2811f7242 /patches/server/0951-fix-MapLike-spam-for-missing-key-selector.patch | |
parent | 44057da46727138e19d951b56e98ad8c25c1f869 (diff) | |
download | Paper-f78d7ce8ffb7e4b6fd5ee256f5e3678ea04fd807.tar.gz Paper-f78d7ce8ffb7e4b6fd5ee256f5e3678ea04fd807.zip |
Remove "fix-curing-zombie-villager-discount" exploit option (#9895)
Diffstat (limited to 'patches/server/0951-fix-MapLike-spam-for-missing-key-selector.patch')
-rw-r--r-- | patches/server/0951-fix-MapLike-spam-for-missing-key-selector.patch | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/patches/server/0951-fix-MapLike-spam-for-missing-key-selector.patch b/patches/server/0951-fix-MapLike-spam-for-missing-key-selector.patch new file mode 100644 index 0000000000..2fee78531f --- /dev/null +++ b/patches/server/0951-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 e7bd45e9834ffc6b94dd07cf69a685de66c9c37a..af5019716f487d9e4259b259712cf022f987603b 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 +@@ -347,7 +347,7 @@ public interface VibrationSystem { + public static Codec<VibrationSystem.Data> CODEC = RecordCodecBuilder.create((instance) -> { + return instance.group(VibrationInfo.CODEC.optionalFieldOf("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) -> { ++ }), Codec.optionalField("selector", VibrationSelector.CODEC).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 + }); + }); |