mirror of
https://github.com/LeavesMC/Leaves.git
synced 2026-01-06 15:51:33 +00:00
Update Paper
This commit is contained in:
28
patches/server/0067-Lava-riptide.patch
Normal file
28
patches/server/0067-Lava-riptide.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
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 f1b2d388a1a40a1d909a2e726f32d6c15e1eb0eb..da3887eec5b1e2b8151d71ddb759d083993d54bb 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/TridentItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/TridentItem.java
|
||||
@@ -72,7 +72,7 @@ public class TridentItem extends Item implements ProjectileItem {
|
||||
if (j >= 10) {
|
||||
float f = EnchantmentHelper.getTridentSpinAttackStrength(stack, entityhuman);
|
||||
|
||||
- if (f <= 0.0F || entityhuman.isInWaterOrRain()) {
|
||||
+ if (f <= 0.0F || entityhuman.isInWaterOrRain() || (org.leavesmc.leaves.LeavesConfig.lavaRiptide && entityhuman.isInLava())) { // Leaves - lava riptide
|
||||
if (!TridentItem.isTooDamagedToUse(stack)) {
|
||||
Holder<SoundEvent> holder = (Holder) EnchantmentHelper.pickHighestLevel(stack, EnchantmentEffectComponents.TRIDENT_SOUND).orElse(SoundEvents.TRIDENT_THROW);
|
||||
|
||||
@@ -150,7 +150,7 @@ public class TridentItem extends Item implements ProjectileItem {
|
||||
|
||||
if (TridentItem.isTooDamagedToUse(itemstack)) {
|
||||
return InteractionResultHolder.fail(itemstack);
|
||||
- } else if (EnchantmentHelper.getTridentSpinAttackStrength(itemstack, user) > 0.0F && !user.isInWaterOrRain()) {
|
||||
+ } else if (EnchantmentHelper.getTridentSpinAttackStrength(itemstack, user) > 0.0F && !user.isInWaterOrRain() && !(org.leavesmc.leaves.LeavesConfig.lavaRiptide && user.isInLava())) { // Leaves - lava riptide
|
||||
return InteractionResultHolder.fail(itemstack);
|
||||
} else {
|
||||
user.startUsingItem(hand);
|
||||
Reference in New Issue
Block a user