Minecraft-Console-Client/MinecraftClient/Protocol/IMinecraftCom.cs

265 lines
12 KiB
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using MinecraftClient.Inventory;
using MinecraftClient.Mapping;
using MinecraftClient.Protocol.Keys;
namespace MinecraftClient.Protocol
{
/// <summary>
/// Interface for the Minecraft protocol handler.
/// A protocol handler is used to communicate with the Minecraft server.
/// This interface allows to abstract from the underlying minecraft version in other parts of the program.
/// The protocol handler will take care of parsing and building the appropriate network packets.
/// </summary>
public interface IMinecraftCom : IDisposable, IAutoComplete
{
/// <summary>
/// Start the login procedure once connected to the server
/// </summary>
/// <returns>True if login was successful</returns>
bool Login(PlayerKeyPair? playerKeyPair, Session.SessionToken session);
/// <summary>
/// Disconnect from the server
/// </summary>
void Disconnect();
/// <summary>
/// Get max length for chat messages
/// </summary>
/// <returns>Max length, in characters</returns>
int GetMaxChatMessageLength();
/// <summary>
/// Get the current protocol version.
/// </summary>
/// <remarks>
/// Version-specific operations should be handled inside the Protocol handled whenever possible.
/// </remarks>
/// <returns>Minecraft Protocol version number</returns>
int GetProtocolVersion();
/// <summary>
/// Send a chat message or command to the server
/// </summary>
/// <param name="message">Text to send</param>
/// <returns>True if successfully sent</returns>
bool SendChatMessage(string message, PlayerKeyPair? playerKeyPair = null);
/// <summary>
/// Allow to respawn after death
/// </summary>
/// <returns>True if packet successfully sent</returns>
bool SendRespawnPacket();
/// <summary>
/// Inform the server of the client being used to connect
/// </summary>
/// <param name="brandInfo">Client string describing the client</param>
/// <returns>True if brand info was successfully sent</returns>
bool SendBrandInfo(string brandInfo);
/// <summary>
/// Inform the server of the client's Minecraft settings
/// </summary>
/// <param name="language">Client language eg en_US</param>
/// <param name="viewDistance">View distance, in chunks</param>
/// <param name="difficulty">Game difficulty (client-side...)</param>
/// <param name="chatMode">Chat mode (allows muting yourself)</param>
/// <param name="chatColors">Show chat colors</param>
/// <param name="skinParts">Show skin layers</param>
/// <param name="mainHand">1.9+ main hand</param>
/// <returns>True if client settings were successfully sent</returns>
bool SendClientSettings(string language, byte viewDistance, byte difficulty, byte chatMode, bool chatColors, byte skinParts, byte mainHand);
/// <summary>
/// Send a location update telling that we moved to that location
/// </summary>
/// <param name="location">The new location</param>
/// <param name="onGround">True if the player is on the ground</param>
2019-04-09 18:01:00 -07:00
/// <param name="yaw">The new yaw (optional)</param>
/// <param name="pitch">The new pitch (optional)</param>
/// <returns>True if packet was successfully sent</returns>
2019-04-09 18:01:00 -07:00
bool SendLocationUpdate(Location location, bool onGround, float? yaw, float? pitch);
/// <summary>
/// Send a plugin channel packet to the server.
/// </summary>
/// <see href="http://dinnerbone.com/blog/2012/01/13/minecraft-plugin-channels-messaging/" />
/// <param name="channel">Channel to send packet on</param>
/// <param name="data">packet Data</param>
/// <returns>True if message was successfully sent</returns>
bool SendPluginChannelPacket(string channel, byte[] data);
/// <summary>
/// Send Entity Action packet to the server.
/// </summary>
/// <param name="entityID">PlayerID</param>
/// <param name="type">Type of packet to send</param>
/// <returns>True if packet was successfully sent</returns>
bool SendEntityAction(int EntityID, int type);
/// <summary>
/// Send a held item change packet to the server.
/// </summary>
/// <param name="slot">New active slot in the inventory hotbar</param>
/// <returns>True if packet was successfully sent</returns>
2020-03-26 15:01:42 +08:00
bool SendHeldItemChange(short slot);
/// <summary>
/// Send an entity interaction packet to the server.
/// </summary>
/// <param name="EntityID">Entity ID to interact with</param>
/// <param name="type">Type of interaction (0: interact, 1: attack, 2: interact at)</param>
/// <returns>True if packet was successfully sent</returns>
bool SendInteractEntity(int EntityID, int type);
/// <summary>
/// Send an entity interaction packet to the server.
/// </summary>
/// <param name="EntityID">Entity ID to interact with</param>
/// <param name="type">Type of interaction (0: interact, 1: attack, 2: interact at)</param>
/// <param name="X">X coordinate for "interact at"</param>
/// <param name="Y">Y coordinate for "interact at"</param>
/// <param name="Z">Z coordinate for "interact at"</param>
/// <param name="hand">Player hand (0: main hand, 1: off hand)</param>
/// <returns>True if packet was successfully sent</returns>
bool SendInteractEntity(int EntityID, int type, float X, float Y, float Z, int hand);
/// <summary>
/// Send an entity interaction packet to the server.
/// </summary>
/// <param name="EntityID">Entity ID to interact with</param>
/// <param name="type">Type of interaction (0: interact, 1: attack, 2: interact at)</param>
/// <param name="X">X coordinate for "interact at"</param>
/// <param name="Y">Y coordinate for "interact at"</param>
/// <param name="Z">Z coordinate for "interact at"</param>
/// <returns>True if packet was successfully sent</returns>
bool SendInteractEntity(int EntityID, int type, float X, float Y, float Z);
ChatBot API: OnScoreboardObjective, OnEntityEffect, OnUpdateScore, EntityInteract, Hand list (#1097) * Create Effect.cs * Rename Effect.cs to Effects.cs * Update MinecraftClient.csproj * Update Effects.cs * Update Effects.cs * add EntityEffect * Update McClient.cs * Update Protocol18.cs + EntityEffect * Update IMinecraftComHandler.cs * Update Protocol18PacketTypes.cs + EntityEffect * Update ChatBot.cs + OnEntityEquipment * Update PacketIncomingType.cs + ScoreboardObjective * Update Protocol18PacketTypes.cs * Update Protocol18.cs * Update IMinecraftComHandler.cs + OnScoreboardObjective * Update McClient.cs + OnScoreboardObjective * Update ChatBot.cs + OnScoreboardObjective event * Update Protocol18.cs: fix scoreboard * Update McClient.cs * Update ChatBot.cs * Update PacketIncomingType.cs * Update ChatBot.cs + OnUpdateScore * Update McClient.cs + OnUpdateScore * Update IMinecraftComHandler.cs + OnUpdateScore * Update Protocol18.cs * Update Protocol18PacketTypes.cs * Update Protocol18.cs + fix micro lags * Update Protocol18.cs * Update Protocol18.cs * Update Protocol18.cs * Update Protocol16.cs * Update Protocol18.cs * Update McClient.cs * Update IMinecraftCom.cs * Update McClient.cs * Update McClient.cs * Update McClient.cs * Update ChatBot.cs + GetEntities() * Create Hand.cs * Update MinecraftClient.csproj * Update McClient.cs * Update ChatBot.cs * Update Protocol18.cs * Update ChatBot.cs * Update ChatBot.cs * Update ChatBot.cs * Update ChatBot.cs * Update ChatBot.cs: fix * Update AutoAttack.cs: Fix * Update McClient.cs: compile fix * Update ChatBot.cs * Update AutoAttack.cs * Update ChatBot.cs * Update Protocol18.cs * Update IMinecraftComHandler.cs * Update McClient.cs * Update ChatBot.cs * Update Protocol18.cs * Update IMinecraftComHandler.cs * Update ChatBot.cs * Update McClient.cs * Update McClient.cs: remove check distance * Update EntityActionType.cs: more actions * Create CommandBlockMode.cs * Create CommandBlockFlags.cs * Update IMinecraftCom.cs * Update McClient.cs * Update ChatBot.cs * Update Protocol18.cs * Update Protocol16.cs * Update PacketOutgoingType.cs * Update Protocol18PacketTypes.cs * Update Protocol18.cs
2020-07-04 13:45:51 +05:00
/// <summary>
/// Send an entity interaction packet to the server.
/// </summary>
/// <param name="EntityID">Entity ID to interact with</param>
/// <param name="type">Type of interaction (0: interact, 1: attack, 2: interact at)</param>
/// <param name="hand">Only if Type is interact or interact at; 0: main hand, 1: off hand</param>
/// <returns>True if packet was successfully sent</returns>
bool SendInteractEntity(int EntityID, int type, int hand);
2020-03-22 20:12:06 +08:00
/// <summary>
/// Send a use item packet to the server
/// </summary>
/// <param name="hand">0: main hand, 1: off hand</param>
/// <param name="sequenceId">Sequence ID used for synchronization</param>
/// <returns>True if packet was successfully sent</returns>
bool SendUseItem(int hand, int sequenceId);
/// <summary>
/// Send a click window slot packet to the server
/// </summary>
/// <param name="windowId">Id of the window being clicked</param>
/// <param name="slotId">Id of the clicked slot</param>
2022-07-25 01:13:41 +08:00
/// <param name="action">Action to perform</param>
/// <param name="item">Item in the clicked slot</param>
2022-07-25 01:13:41 +08:00
/// <param name="changedSlots">Slots that have been changed in this event: List<SlotID, Changed Items> </param>
/// <param name="stateId">Inventory's stateId</param>
/// <returns>True if packet was successfully sent</returns>
2022-09-08 14:04:23 +08:00
bool SendWindowAction(int windowId, int slotId, WindowActionType action, Item? item, List<Tuple<short, Item?>> changedSlots, int stateId);
/// <summary>
2020-05-25 21:39:24 +02:00
/// Request Creative Mode item creation into regular/survival Player Inventory
/// </summary>
/// <remarks>(obviously) requires to be in creative mode</remarks>
/// <param name="slot">Destination inventory slot</param>
/// <param name="itemType">Item type</param>
/// <param name="count">Item count</param>
/// <param name="nbt">Optional item NBT</param>
2020-05-25 21:39:24 +02:00
/// <returns>TRUE if item given successfully</returns>
bool SendCreativeInventoryAction(int slot, ItemType itemType, int count, Dictionary<string, object>? nbt);
2022-10-12 19:51:01 +02:00
/// <summary>
/// Send a click container button packet to the server.
/// Used for Enchanting table, Lectern, stone cutter and loom
/// </summary>
/// <param name="windowId">Id of the window being clicked</param>
/// <param name="buttonId">Id of the clicked button</param>
/// <returns>True if packet was successfully sent</returns>
bool ClickContainerButton(int windowId, int buttonId);
2020-05-26 14:02:09 +05:00
/// <summary>
/// Plays animation
/// </summary>
/// <param name="animation">0 for left arm, 1 for right arm</param>
/// <param name="playerid">Player Entity ID</param>
2020-05-26 14:02:09 +05:00
/// <returns>TRUE if item given successfully</returns>
bool SendAnimation(int animation, int playerid);
2020-05-26 14:02:09 +05:00
/// <summary>
/// Send a close window packet to the server
/// </summary>
/// <param name="windowId">Id of the window being closed</param>
bool SendCloseWindow(int windowId);
2020-03-26 15:01:42 +08:00
/// <summary>
/// Send player block placement packet to the server
/// </summary>
/// <param name="hand">0: main hand, 1: off hand</param>
/// <param name="location">Location to place block at</param>
/// <param name="face">Block face</param>
/// <param name="sequenceId">Sequence ID (use for synchronization)</param>
/// <returns>True if packet was successfully sent</returns>
bool SendPlayerBlockPlacement(int hand, Location location, Direction face, int sequenceId);
Add SendPlaceBlock, PlayerDigging, OnExplosion, OnGamemodeUpdate, OnSetExperience (#1027) * Update ChatBot.cs + PlaceBlock * Update AutoAttack.cs + HitAnimation * Update PacketIncomingType.cs + Explosion, * Update McTcpClient.cs + OnExplosion * Update ChatBot.cs + OnExplosion * Update IMinecraftComHandler.cs + OnExplosion * Update Protocol18PacketTypes.cs + PacketIncomingType.Explosion * Update ChatBot.cs + Fix * Update AutoAttack.cs + Fix * Update ChatBot.cs + Fix * Update Protocol18PacketTypes.cs + Old versions * Update Protocol18PacketTypes.cs + 1.7 - 1.8 Explosion ID * Update Protocol18PacketTypes.cs + Fix * Update McTcpClient.cs + int ExplosionRecordCount * Update ChatBot.cs + recordcount * Update IMinecraftComHandler.cs + ExplosionRecordCount * Update Protocol18.cs * Update CSharpRunner.cs + using MinecraftClient.Inventory; * add OnGamemodeUpdate + OnGamemodeUpdate * + OnGamemodeUpdate(playername, uuid, gamemode) + OnGamemodeUpdate * Update Protocol18.cs * Update IMinecraftComHandler.cs * Update McTcpClient.cs Fix * Update McTcpClient.cs * Update Protocol18.cs + Location explodelocation * Update McTcpClient.cs + Location explode * Update ChatBot.cs + Fix * Update ChatBot.cs Remove excess + * Update Plays animation * Improve documentation * ItemType fix * OnExplosion(Location explod); * Update PacketIncomingType.cs add SetExperience, * + Old versions * Update IMinecraftComHandler.cs * Update McTcpClient.cs * Update Protocol18.cs * add GetLevel & GetTotalExperience * Fix * add GetLevel & GetTotalExperience * OnSetExpience * Update ChatBot.cs Fix * Update McTcpClient.cs + bot.OnSetExperience * Update Protocol18.cs + Fix * Update McTcpClient.cs + PlayerDigging * Update PacketOutgoingType.cs + PlayerDigging * Update Protocol18PacketTypes.cs + case PacketOutgoingType.PlayerDigging * Update Protocol18.cs + SendPlayerDigging * Update IMinecraftCom.cs + SendPlayerDigging * Update McTcpClient.cs + PlayerDigging * Update Protocol16.cs + SendPlayerDigging * Update ChatBot.cs + PlayerDigging * Update ChatBot.cs + Fix * Update McTcpClient.cs + Fix * Update ChatBot.cs Add WindowAction * ChatBot.cs Fixes * Further ChatBot.cs fixes * Further ChatBot.cs fixes * Protocol Handler fixes * Protocol Handler fixes * IMinecraftCom fixes * documentation fixes Co-authored-by: ORelio <oreliogitantispam.l0gin@spamgourmet.com>
2020-05-29 23:18:34 +05:00
/// <summary>
/// Send player blog digging packet to the server. This packet needs to be called at least twice: Once to begin digging, then a second time to finish digging
Add SendPlaceBlock, PlayerDigging, OnExplosion, OnGamemodeUpdate, OnSetExperience (#1027) * Update ChatBot.cs + PlaceBlock * Update AutoAttack.cs + HitAnimation * Update PacketIncomingType.cs + Explosion, * Update McTcpClient.cs + OnExplosion * Update ChatBot.cs + OnExplosion * Update IMinecraftComHandler.cs + OnExplosion * Update Protocol18PacketTypes.cs + PacketIncomingType.Explosion * Update ChatBot.cs + Fix * Update AutoAttack.cs + Fix * Update ChatBot.cs + Fix * Update Protocol18PacketTypes.cs + Old versions * Update Protocol18PacketTypes.cs + 1.7 - 1.8 Explosion ID * Update Protocol18PacketTypes.cs + Fix * Update McTcpClient.cs + int ExplosionRecordCount * Update ChatBot.cs + recordcount * Update IMinecraftComHandler.cs + ExplosionRecordCount * Update Protocol18.cs * Update CSharpRunner.cs + using MinecraftClient.Inventory; * add OnGamemodeUpdate + OnGamemodeUpdate * + OnGamemodeUpdate(playername, uuid, gamemode) + OnGamemodeUpdate * Update Protocol18.cs * Update IMinecraftComHandler.cs * Update McTcpClient.cs Fix * Update McTcpClient.cs * Update Protocol18.cs + Location explodelocation * Update McTcpClient.cs + Location explode * Update ChatBot.cs + Fix * Update ChatBot.cs Remove excess + * Update Plays animation * Improve documentation * ItemType fix * OnExplosion(Location explod); * Update PacketIncomingType.cs add SetExperience, * + Old versions * Update IMinecraftComHandler.cs * Update McTcpClient.cs * Update Protocol18.cs * add GetLevel & GetTotalExperience * Fix * add GetLevel & GetTotalExperience * OnSetExpience * Update ChatBot.cs Fix * Update McTcpClient.cs + bot.OnSetExperience * Update Protocol18.cs + Fix * Update McTcpClient.cs + PlayerDigging * Update PacketOutgoingType.cs + PlayerDigging * Update Protocol18PacketTypes.cs + case PacketOutgoingType.PlayerDigging * Update Protocol18.cs + SendPlayerDigging * Update IMinecraftCom.cs + SendPlayerDigging * Update McTcpClient.cs + PlayerDigging * Update Protocol16.cs + SendPlayerDigging * Update ChatBot.cs + PlayerDigging * Update ChatBot.cs + Fix * Update McTcpClient.cs + Fix * Update ChatBot.cs Add WindowAction * ChatBot.cs Fixes * Further ChatBot.cs fixes * Further ChatBot.cs fixes * Protocol Handler fixes * Protocol Handler fixes * IMinecraftCom fixes * documentation fixes Co-authored-by: ORelio <oreliogitantispam.l0gin@spamgourmet.com>
2020-05-29 23:18:34 +05:00
/// </summary>
/// <param name="status">0 to start digging, 1 to cancel, 2 to finish ( https://wiki.vg/Protocol#Player_Digging )</param>
Add SendPlaceBlock, PlayerDigging, OnExplosion, OnGamemodeUpdate, OnSetExperience (#1027) * Update ChatBot.cs + PlaceBlock * Update AutoAttack.cs + HitAnimation * Update PacketIncomingType.cs + Explosion, * Update McTcpClient.cs + OnExplosion * Update ChatBot.cs + OnExplosion * Update IMinecraftComHandler.cs + OnExplosion * Update Protocol18PacketTypes.cs + PacketIncomingType.Explosion * Update ChatBot.cs + Fix * Update AutoAttack.cs + Fix * Update ChatBot.cs + Fix * Update Protocol18PacketTypes.cs + Old versions * Update Protocol18PacketTypes.cs + 1.7 - 1.8 Explosion ID * Update Protocol18PacketTypes.cs + Fix * Update McTcpClient.cs + int ExplosionRecordCount * Update ChatBot.cs + recordcount * Update IMinecraftComHandler.cs + ExplosionRecordCount * Update Protocol18.cs * Update CSharpRunner.cs + using MinecraftClient.Inventory; * add OnGamemodeUpdate + OnGamemodeUpdate * + OnGamemodeUpdate(playername, uuid, gamemode) + OnGamemodeUpdate * Update Protocol18.cs * Update IMinecraftComHandler.cs * Update McTcpClient.cs Fix * Update McTcpClient.cs * Update Protocol18.cs + Location explodelocation * Update McTcpClient.cs + Location explode * Update ChatBot.cs + Fix * Update ChatBot.cs Remove excess + * Update Plays animation * Improve documentation * ItemType fix * OnExplosion(Location explod); * Update PacketIncomingType.cs add SetExperience, * + Old versions * Update IMinecraftComHandler.cs * Update McTcpClient.cs * Update Protocol18.cs * add GetLevel & GetTotalExperience * Fix * add GetLevel & GetTotalExperience * OnSetExpience * Update ChatBot.cs Fix * Update McTcpClient.cs + bot.OnSetExperience * Update Protocol18.cs + Fix * Update McTcpClient.cs + PlayerDigging * Update PacketOutgoingType.cs + PlayerDigging * Update Protocol18PacketTypes.cs + case PacketOutgoingType.PlayerDigging * Update Protocol18.cs + SendPlayerDigging * Update IMinecraftCom.cs + SendPlayerDigging * Update McTcpClient.cs + PlayerDigging * Update Protocol16.cs + SendPlayerDigging * Update ChatBot.cs + PlayerDigging * Update ChatBot.cs + Fix * Update McTcpClient.cs + Fix * Update ChatBot.cs Add WindowAction * ChatBot.cs Fixes * Further ChatBot.cs fixes * Further ChatBot.cs fixes * Protocol Handler fixes * Protocol Handler fixes * IMinecraftCom fixes * documentation fixes Co-authored-by: ORelio <oreliogitantispam.l0gin@spamgourmet.com>
2020-05-29 23:18:34 +05:00
/// <param name="location">Location</param>
/// <param name="face">Block face</param>
/// <param name="sequenceId">Sequence ID (use for synchronization)</param>
/// <returns>True if packet was succcessfully sent</returns>
bool SendPlayerDigging(int status, Location location, Direction face, int sequenceId);
/// <summary>
/// Change text on a sign
/// </summary>
/// <param name="location">Location of Sign block</param>
/// <param name="line1">New line 1</param>
/// <param name="line2">New line 2</param>
/// <param name="line3">New line 3</param>
/// <param name="line4">New line 4</param>
Add SendPlaceBlock, PlayerDigging, OnExplosion, OnGamemodeUpdate, OnSetExperience (#1027) * Update ChatBot.cs + PlaceBlock * Update AutoAttack.cs + HitAnimation * Update PacketIncomingType.cs + Explosion, * Update McTcpClient.cs + OnExplosion * Update ChatBot.cs + OnExplosion * Update IMinecraftComHandler.cs + OnExplosion * Update Protocol18PacketTypes.cs + PacketIncomingType.Explosion * Update ChatBot.cs + Fix * Update AutoAttack.cs + Fix * Update ChatBot.cs + Fix * Update Protocol18PacketTypes.cs + Old versions * Update Protocol18PacketTypes.cs + 1.7 - 1.8 Explosion ID * Update Protocol18PacketTypes.cs + Fix * Update McTcpClient.cs + int ExplosionRecordCount * Update ChatBot.cs + recordcount * Update IMinecraftComHandler.cs + ExplosionRecordCount * Update Protocol18.cs * Update CSharpRunner.cs + using MinecraftClient.Inventory; * add OnGamemodeUpdate + OnGamemodeUpdate * + OnGamemodeUpdate(playername, uuid, gamemode) + OnGamemodeUpdate * Update Protocol18.cs * Update IMinecraftComHandler.cs * Update McTcpClient.cs Fix * Update McTcpClient.cs * Update Protocol18.cs + Location explodelocation * Update McTcpClient.cs + Location explode * Update ChatBot.cs + Fix * Update ChatBot.cs Remove excess + * Update Plays animation * Improve documentation * ItemType fix * OnExplosion(Location explod); * Update PacketIncomingType.cs add SetExperience, * + Old versions * Update IMinecraftComHandler.cs * Update McTcpClient.cs * Update Protocol18.cs * add GetLevel & GetTotalExperience * Fix * add GetLevel & GetTotalExperience * OnSetExpience * Update ChatBot.cs Fix * Update McTcpClient.cs + bot.OnSetExperience * Update Protocol18.cs + Fix * Update McTcpClient.cs + PlayerDigging * Update PacketOutgoingType.cs + PlayerDigging * Update Protocol18PacketTypes.cs + case PacketOutgoingType.PlayerDigging * Update Protocol18.cs + SendPlayerDigging * Update IMinecraftCom.cs + SendPlayerDigging * Update McTcpClient.cs + PlayerDigging * Update Protocol16.cs + SendPlayerDigging * Update ChatBot.cs + PlayerDigging * Update ChatBot.cs + Fix * Update McTcpClient.cs + Fix * Update ChatBot.cs Add WindowAction * ChatBot.cs Fixes * Further ChatBot.cs fixes * Further ChatBot.cs fixes * Protocol Handler fixes * Protocol Handler fixes * IMinecraftCom fixes * documentation fixes Co-authored-by: ORelio <oreliogitantispam.l0gin@spamgourmet.com>
2020-05-29 23:18:34 +05:00
/// <returns>True if packet was succcessfully sent</returns>
Implement OnMapData, OnTitle, UpdateSign, OnEntityEquipment, Useblock (#1071) * + Fix null PlayerInventory + Fix null PlayerInventory * Update Protocol18.cs * Update McTcpClient.cs + Fix https://github.com/ORelio/Minecraft-Console-Client/issues/1022 * Update Protocol18.cs + MapData * Update PacketIncomingType.cs + MapData * Update Protocol18PacketTypes.cs * Update IMinecraftComHandler.cs + OnMapData * Update McTcpClient.cs + OnMapData * Update ChatBot.cs + OnMapData * Update Protocol18.cs * Update Protocol18PacketTypes.cs + Fix * Update PacketIncomingType.cs + Title * Update Protocol18PacketTypes.cs * Update Protocol18.cs * Update IMinecraftComHandler.cs + OnTitle * Update McTcpClient.cs * Update ChatBot.cs + OnTitle * Update Protocol18.cs Fix * Update IMinecraftComHandler.cs * Update McTcpClient.cs * add ClearInventories() * add ClearInventories() * Update McTcpClient.cs + OnTitle * Preparing to Add BlockAction * Update PacketOutgoingType.cs * Update PacketOutgoingType.cs * Update Protocol18.cs + SendUpdateSign * Update Protocol16.cs + SendUpdateSign * Update IMinecraftCom.cs + SendUpdateSign * Update McTcpClient.cs + UpdateSign * Update ChatBot.cs + UpdateSign * Update McTcpClient.cs Update PlaceBlock * Update ChatBot.cs * Update McTcpClient.cs * add SendCreativeInventoryAction nbt add SendCreativeInventoryAction nbt * Update Protocol18.cs * Update Protocol16.cs * Update McTcpClient.cs * Update ChatBot.cs * Update Inventory.cs * Update Protocol18PacketTypes.cs * Update PacketIncomingType.cs * Update Protocol18PacketTypes.cs * Update Protocol18PacketTypes.cs Fix * Update Protocol18PacketTypes.cs Fix * Update IMinecraftComHandler.cs * Update IMinecraftComHandler.cs * Update ChatBot.cs * Update McTcpClient.cs + OnEntityEquipment * Update Protocol18.cs * Update McTcpClient.cs * Update McTcpClient.cs * Update McTcpClient.cs * Update ChatBot.cs * Update McTcpClient.cs * Update McTcpClient.cs * Update ChatBot.cs * Update McTcpClient.cs * Update McTcpClient.cs * Update ChatBot.cs * Update McTcpClient.cs * Update McTcpClient.cs * Update Protocol18.cs * Update McTcpClient.cs * Update ChatBot.cs * Update ChatBot.cs * Update McTcpClient.cs * Update McTcpClient.cs * Update McTcpClient.cs * Update Protocol18.cs * Create Useblock.cs * Update MinecraftClient.csproj * Update McTcpClient.cs
2020-06-20 17:57:07 +05:00
bool SendUpdateSign(Location location, string line1, string line2, string line3, string line4);
ChatBot API: OnScoreboardObjective, OnEntityEffect, OnUpdateScore, EntityInteract, Hand list (#1097) * Create Effect.cs * Rename Effect.cs to Effects.cs * Update MinecraftClient.csproj * Update Effects.cs * Update Effects.cs * add EntityEffect * Update McClient.cs * Update Protocol18.cs + EntityEffect * Update IMinecraftComHandler.cs * Update Protocol18PacketTypes.cs + EntityEffect * Update ChatBot.cs + OnEntityEquipment * Update PacketIncomingType.cs + ScoreboardObjective * Update Protocol18PacketTypes.cs * Update Protocol18.cs * Update IMinecraftComHandler.cs + OnScoreboardObjective * Update McClient.cs + OnScoreboardObjective * Update ChatBot.cs + OnScoreboardObjective event * Update Protocol18.cs: fix scoreboard * Update McClient.cs * Update ChatBot.cs * Update PacketIncomingType.cs * Update ChatBot.cs + OnUpdateScore * Update McClient.cs + OnUpdateScore * Update IMinecraftComHandler.cs + OnUpdateScore * Update Protocol18.cs * Update Protocol18PacketTypes.cs * Update Protocol18.cs + fix micro lags * Update Protocol18.cs * Update Protocol18.cs * Update Protocol18.cs * Update Protocol16.cs * Update Protocol18.cs * Update McClient.cs * Update IMinecraftCom.cs * Update McClient.cs * Update McClient.cs * Update McClient.cs * Update ChatBot.cs + GetEntities() * Create Hand.cs * Update MinecraftClient.csproj * Update McClient.cs * Update ChatBot.cs * Update Protocol18.cs * Update ChatBot.cs * Update ChatBot.cs * Update ChatBot.cs * Update ChatBot.cs * Update ChatBot.cs: fix * Update AutoAttack.cs: Fix * Update McClient.cs: compile fix * Update ChatBot.cs * Update AutoAttack.cs * Update ChatBot.cs * Update Protocol18.cs * Update IMinecraftComHandler.cs * Update McClient.cs * Update ChatBot.cs * Update Protocol18.cs * Update IMinecraftComHandler.cs * Update ChatBot.cs * Update McClient.cs * Update McClient.cs: remove check distance * Update EntityActionType.cs: more actions * Create CommandBlockMode.cs * Create CommandBlockFlags.cs * Update IMinecraftCom.cs * Update McClient.cs * Update ChatBot.cs * Update Protocol18.cs * Update Protocol16.cs * Update PacketOutgoingType.cs * Update Protocol18PacketTypes.cs * Update Protocol18.cs
2020-07-04 13:45:51 +05:00
/// <summary>
/// Update command block
/// </summary>
/// <param name="location">command block location</param>
/// <param name="command">command</param>
/// <param name="mode">command block mode</param>
/// <param name="flags">command block flags</param>
bool UpdateCommandBlock(Location location, string command, CommandBlockMode mode, CommandBlockFlags flags);
/// <summary>
/// Select villager trade
/// </summary>
/// <param name="selectedSlot">The slot of the trade, starts at 0.</param>
bool SelectTrade(int selectedSlot);
/// <summary>
/// Spectate a player/entity
/// </summary>
/// <param name="uuid">The uuid of the player/entity to spectate/teleport to.</param>
bool SendSpectate(Guid uuid);
/// <summary>
/// Get net read thread (main thread) ID
/// </summary>
/// <returns>Net read thread ID</returns>
int GetNetMainThreadId();
}
}