mirror of
https://github.com/LeavesMC/Leaves.git
synced 2026-01-03 14:22:09 +00:00
29 lines
1.8 KiB
Diff
29 lines
1.8 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/net/minecraft/world/item/TridentItem.java b/net/minecraft/world/item/TridentItem.java
|
|
index df629e3f2defce5e65aaf874d7c5ddff71f39c28..a069729494d638e5f0828c12ad1186e748d0677e 100644
|
|
--- a/net/minecraft/world/item/TridentItem.java
|
|
+++ b/net/minecraft/world/item/TridentItem.java
|
|
@@ -70,7 +70,7 @@ public class TridentItem extends Item implements ProjectileItem {
|
|
return false;
|
|
} else {
|
|
float tridentSpinAttackStrength = EnchantmentHelper.getTridentSpinAttackStrength(stack, player);
|
|
- if (tridentSpinAttackStrength > 0.0F && !player.isInWaterOrRain()) {
|
|
+ if (tridentSpinAttackStrength > 0.0F && !player.isInWaterOrRain() || (org.leavesmc.leaves.LeavesConfig.modify.lavaRiptide && player.isInLava())) { // Leaves - lava riptide
|
|
return false;
|
|
} else if (stack.nextDamageWillBreak()) {
|
|
return false;
|
|
@@ -150,7 +150,7 @@ public class TridentItem extends Item implements ProjectileItem {
|
|
ItemStack itemInHand = player.getItemInHand(hand);
|
|
if (itemInHand.nextDamageWillBreak()) {
|
|
return InteractionResult.FAIL;
|
|
- } else if (EnchantmentHelper.getTridentSpinAttackStrength(itemInHand, player) > 0.0F && !player.isInWaterOrRain()) {
|
|
+ } else if (EnchantmentHelper.getTridentSpinAttackStrength(itemInHand, player) > 0.0F && !player.isInWaterOrRain() && !(org.leavesmc.leaves.LeavesConfig.modify.lavaRiptide && player.isInLava())) { // Leaves - lava riptide
|
|
return InteractionResult.FAIL;
|
|
} else {
|
|
player.startUsingItem(hand);
|