mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-19 14:59:32 +00:00
* feat: remove some features(#724) * feat: remove some features(#724) * merge master * fix
20 lines
1.6 KiB
Diff
20 lines
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: MC_XiaoHei <xor7xiaohei@gmail.com>
|
|
Date: Thu, 3 Jul 2025 21:33:29 +0800
|
|
Subject: [PATCH] Old leash behavior when use firework
|
|
|
|
|
|
diff --git a/net/minecraft/world/item/FireworkRocketItem.java b/net/minecraft/world/item/FireworkRocketItem.java
|
|
index 0e4335bb2469a4698b303b598ec773b5c7cc73ce..1a514f09873c9249a1d7ad77c8cd2d647d24772f 100644
|
|
--- a/net/minecraft/world/item/FireworkRocketItem.java
|
|
+++ b/net/minecraft/world/item/FireworkRocketItem.java
|
|
@@ -87,7 +87,7 @@ public class FireworkRocketItem extends Item implements ProjectileItem {
|
|
com.destroystokyo.paper.event.player.PlayerElytraBoostEvent event = new com.destroystokyo.paper.event.player.PlayerElytraBoostEvent((org.bukkit.entity.Player) player.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemInHand), (org.bukkit.entity.Firework) delayed.projectile().getBukkitEntity(), org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(hand));
|
|
if (event.callEvent() && delayed.attemptSpawn()) {
|
|
player.awardStat(Stats.ITEM_USED.get(this)); // Moved up from below
|
|
- if (player.dropAllLeashConnections(null)) {
|
|
+ if (!org.leavesmc.leaves.LeavesConfig.modify.oldMC.keepLeashConnectWhenUseFirework && player.dropAllLeashConnections(null)) { // Leaves - Keep leash connection when using firework
|
|
level.playSound(null, player, SoundEvents.LEAD_BREAK, SoundSource.NEUTRAL, 1.0F, 1.0F);
|
|
}
|
|
if (event.shouldConsume() && !player.hasInfiniteMaterials()) {
|