9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-21 15:59:26 +00:00
Files
SakuraMC/patches/server/0039-Option-to-configure-entity-water-sensitivity.patch
Samsuik 90d5b445b2 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@3ea95ef Do not access world state to see if we can see a Player
PaperMC/Paper@71c84c8 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10277)
PaperMC/Paper@e3bc4c4 Make debug mode print current configuration phase
PaperMC/Paper@d0ebfbb Fix corrupted plugin.yml breaking plugin loading (#10279)
PaperMC/Paper@681bbff Fix spawnreason saving
2024-02-26 17:34:05 +00:00

20 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samsuik <40902469+Samsuik@users.noreply.github.com>
Date: Tue, 21 Nov 2023 11:21:37 +0000
Subject: [PATCH] Option to configure entity water sensitivity
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 4a85c137dee528b56c2b9353bfbad86005ff709f..decb925446701a38455d7f33a676e73858946e67 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3525,7 +3525,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
}
// Paper end - Add EntityMoveEvent
- if (!this.level().isClientSide && this.isSensitiveToWater() && this.isInWaterRainOrBubble()) {
+ if (!this.level().isClientSide && this.level().sakuraConfig().entity.waterSensitivity && this.isSensitiveToWater() && this.isInWaterRainOrBubble()) { // Sakura - configure entity water sensitivity
this.hurt(this.damageSources().drown(), 1.0F);
}