mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-29 11:49:07 +00:00
Add option to disable entity water sensitivity
This commit is contained in:
18
patches/server/0038-fixup-Sakura-Configuration-Files.patch
Normal file
18
patches/server/0038-fixup-Sakura-Configuration-Files.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samsuik <40902469+Samsuik@users.noreply.github.com>
|
||||
Date: Tue, 21 Nov 2023 11:20:14 +0000
|
||||
Subject: [PATCH] fixup! Sakura Configuration Files
|
||||
|
||||
|
||||
diff --git a/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java b/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java
|
||||
index 4e62a5fbd2e1e674abfe4afb763118b7b0127b67..21310cd375267759f61cffd99dcfb0a6c5263151 100644
|
||||
--- a/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java
|
||||
+++ b/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java
|
||||
@@ -129,6 +129,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
public class Entity extends ConfigurationPart {
|
||||
@Comment("Only modify if you know what you're doing")
|
||||
public boolean disableMobAi = false;
|
||||
+ public boolean waterSensitivity = true;
|
||||
|
||||
public Items items = new Items();
|
||||
public class Items extends ConfigurationPart {
|
||||
@@ -0,0 +1,19 @@
|
||||
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 12f8e63e9abc37e24f83662b39265befc8942683..53f84d80e8436837c5fd0bc79e559caf9154e6ed 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3492,7 +3492,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
}
|
||||
// Paper end
|
||||
- if (!this.level().isClientSide && this.isSensitiveToWater() && this.isInWaterRainOrBubble()) {
|
||||
+ if (!this.level().isClientSide && this.level().sakuraConfig().entity.waterSensitivity && this.isSensitiveToWater() && this.isInWaterRainOrBubble()) { // Sakura
|
||||
this.hurt(this.damageSources().drown(), 1.0F);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user