mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Fix missing cool down indicator when attacking mobs (#3230)
This commit is contained in:
parent
50ea5eac9a
commit
33af9e094c
1 changed files with 7 additions and 4 deletions
|
@ -54,6 +54,7 @@ import org.geysermc.geyser.inventory.Inventory;
|
||||||
import org.geysermc.geyser.inventory.PlayerInventory;
|
import org.geysermc.geyser.inventory.PlayerInventory;
|
||||||
import org.geysermc.geyser.inventory.click.Click;
|
import org.geysermc.geyser.inventory.click.Click;
|
||||||
import org.geysermc.geyser.level.block.BlockStateValues;
|
import org.geysermc.geyser.level.block.BlockStateValues;
|
||||||
|
import org.geysermc.geyser.network.MinecraftProtocol;
|
||||||
import org.geysermc.geyser.registry.BlockRegistries;
|
import org.geysermc.geyser.registry.BlockRegistries;
|
||||||
import org.geysermc.geyser.registry.type.ItemMapping;
|
import org.geysermc.geyser.registry.type.ItemMapping;
|
||||||
import org.geysermc.geyser.registry.type.ItemMappings;
|
import org.geysermc.geyser.registry.type.ItemMappings;
|
||||||
|
@ -62,10 +63,7 @@ import org.geysermc.geyser.translator.inventory.InventoryTranslator;
|
||||||
import org.geysermc.geyser.translator.inventory.item.ItemTranslator;
|
import org.geysermc.geyser.translator.inventory.item.ItemTranslator;
|
||||||
import org.geysermc.geyser.translator.protocol.PacketTranslator;
|
import org.geysermc.geyser.translator.protocol.PacketTranslator;
|
||||||
import org.geysermc.geyser.translator.protocol.Translator;
|
import org.geysermc.geyser.translator.protocol.Translator;
|
||||||
import org.geysermc.geyser.util.BlockUtils;
|
import org.geysermc.geyser.util.*;
|
||||||
import org.geysermc.geyser.util.EntityUtils;
|
|
||||||
import org.geysermc.geyser.util.InteractionResult;
|
|
||||||
import org.geysermc.geyser.util.InventoryUtils;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
@ -468,6 +466,11 @@ public class BedrockInventoryTransactionTranslator extends PacketTranslator<Inve
|
||||||
ServerboundInteractPacket attackPacket = new ServerboundInteractPacket(entityId,
|
ServerboundInteractPacket attackPacket = new ServerboundInteractPacket(entityId,
|
||||||
InteractAction.ATTACK, session.isSneaking());
|
InteractAction.ATTACK, session.isSneaking());
|
||||||
session.sendDownstreamPacket(attackPacket);
|
session.sendDownstreamPacket(attackPacket);
|
||||||
|
|
||||||
|
if (MinecraftProtocol.supports1_19_10(session)) {
|
||||||
|
// Since 1.19.10, LevelSoundEventPackets are no longer sent by the client when attacking entities
|
||||||
|
CooldownUtils.sendCooldown(session);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue