use of net.mcft.copy.betterstorage.network.packet.PacketDrinkingHelmetUse in project BetterStorage by copygirl.
the class KeyBindingHandler method onKey.
@SubscribeEvent
public void onKey(KeyInputEvent event) {
Minecraft mc = Minecraft.getMinecraft();
EntityPlayer player = mc.thePlayer;
if (!mc.inGameHasFocus || (player == null))
return;
if (backpackOpen.isPressed() && (ItemBackpack.getBackpack(player) != null) && BetterStorage.globalConfig.getBoolean(GlobalConfig.enableBackpackOpen))
BetterStorage.networkChannel.sendToServer(new PacketBackpackOpen());
else if (drinkingHelmet.isPressed() && (player.getEquipmentInSlot(EquipmentSlot.HEAD) != null))
BetterStorage.networkChannel.sendToServer(new PacketDrinkingHelmetUse());
}
Aggregations