From ed074acb5489aa078ef0efbb701e6490c87d37f7 Mon Sep 17 00:00:00 2001 From: bridgelol Date: Mon, 4 Nov 2024 13:20:49 +0100 Subject: [PATCH] Add player weather support to Entity#isInRain() --- ...r-weather-support-to-Entity-isInRain.patch | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 patches/server/1060-Add-player-weather-support-to-Entity-isInRain.patch diff --git a/patches/server/1060-Add-player-weather-support-to-Entity-isInRain.patch b/patches/server/1060-Add-player-weather-support-to-Entity-isInRain.patch new file mode 100644 index 000000000000..e40c613970dc --- /dev/null +++ b/patches/server/1060-Add-player-weather-support-to-Entity-isInRain.patch @@ -0,0 +1,27 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: bridge +Date: Mon, 4 Nov 2024 13:19:43 +0100 +Subject: [PATCH] Add player weather support to Entity#isInRain() + + +diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java +index cffbd3300967e5d80b5973b35a76235bb2aa1b73..fdde23a0bcb538f033c797ca9c356efa93b83247 100644 +--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java ++++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +@@ -3308,4 +3308,16 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple + return (CraftPlayer) super.getBukkitEntity(); + } + // CraftBukkit end ++ ++ ++ // Paper start - Add player weather support ++ @Override ++ public boolean isInRain() { ++ if (weather == WeatherType.DOWNFALL) { ++ return true; ++ } ++ ++ return super.isInRain(); ++ } ++ // Paper end + }