mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-30 20:39:15 +00:00
29 lines
1.7 KiB
Diff
29 lines
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
|
Date: Fri, 7 Jul 2023 16:53:32 +0800
|
|
Subject: [PATCH] Lava riptide
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/item/TridentItem.java b/src/main/java/net/minecraft/world/item/TridentItem.java
|
|
index 8b9a93ef71164cce8a616735b71d96d37e83b1a8..98b10cca7e583da08f43e312d387e37a95fa7686 100644
|
|
--- a/src/main/java/net/minecraft/world/item/TridentItem.java
|
|
+++ b/src/main/java/net/minecraft/world/item/TridentItem.java
|
|
@@ -75,7 +75,7 @@ public class TridentItem extends Item implements ProjectileItem {
|
|
} else {
|
|
float f = EnchantmentHelper.getTridentSpinAttackStrength(stack, entityhuman);
|
|
|
|
- if (f > 0.0F && !entityhuman.isInWaterOrRain()) {
|
|
+ if (f > 0.0F && !entityhuman.isInWaterOrRain() || (org.leavesmc.leaves.LeavesConfig.modify.lavaRiptide && entityhuman.isInLava())) { // Leaves - lava riptide
|
|
return false;
|
|
} else if (stack.nextDamageWillBreak()) {
|
|
return false;
|
|
@@ -158,7 +158,7 @@ public class TridentItem extends Item implements ProjectileItem {
|
|
|
|
if (itemstack.nextDamageWillBreak()) {
|
|
return InteractionResult.FAIL;
|
|
- } else if (EnchantmentHelper.getTridentSpinAttackStrength(itemstack, user) > 0.0F && !user.isInWaterOrRain()) {
|
|
+ } else if (EnchantmentHelper.getTridentSpinAttackStrength(itemstack, user) > 0.0F && !user.isInWaterOrRain() && !(org.leavesmc.leaves.LeavesConfig.modify.lavaRiptide && user.isInLava())) { // Leaves - lava riptide
|
|
return InteractionResult.FAIL;
|
|
} else {
|
|
user.startUsingItem(hand);
|