9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-27 18:59:06 +00:00

configure enderpearls being slowed down by water

This commit is contained in:
Samsuik
2025-09-28 13:47:19 +01:00
parent be7650ff6d
commit 590ddfe056
2 changed files with 8 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
+++ b/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
@@ -39,6 +_,15 @@
@@ -39,6 +_,21 @@
super(EntityType.ENDER_PEARL, owner, level, item);
}
@@ -12,6 +12,12 @@
+ : super.getClipType();
+ }
+ // Sakura end - enderpearls use outline for collision
+ // Sakura start - configure enderpearls being slowed down by water
+ @Override
+ public final boolean isInWater() {
+ return super.isInWater() && this.level().sakuraConfig().entity.enderPearl.slowedDownByWater;
+ }
+ // Sakura end - configure enderpearls being slowed down by water
+
@Override
public Item getDefaultItem() {

View File

@@ -229,6 +229,7 @@ public final class WorldConfiguration extends ConfigurationPart {
public class EnderPearl extends ConfigurationPart {
public boolean useOutlineForCollision = false;
public boolean preventTeleportingInsideBlocks = false;
public boolean slowedDownByWater = true;
}
}