Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add player weather support to Entity#isInRain() #11574

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: bridge <[email protected]>
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
}
Loading