Inventory handling

This commit is contained in:
ReinforceZwei 2020-03-26 15:01:42 +08:00 committed by ORelio
parent c870f080f2
commit bc449b404e
20 changed files with 538 additions and 44 deletions

View file

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using MinecraftClient.Mapping;
using MinecraftClient.Inventory;
namespace MinecraftClient.Protocol
{
@ -52,7 +53,7 @@ namespace MinecraftClient.Protocol
/// <summary>
/// Called when an inventory is opened
/// </summary>
void OnInventoryOpen(Inventory inventory);
void OnInventoryOpen(Container inventory);
/// <summary>
/// Called when an inventory is closed
@ -131,6 +132,8 @@ namespace MinecraftClient.Protocol
void OnSpawnLivingEntity(int EntityID, int EntityType, Guid UUID, Location location);
void OnSpawnPlayer(int EntityID, Guid UUID, Location location, byte Yaw, byte Pitch);
void OnDestroyEntities(int[] EntityID);
void OnEntityPosition(int EntityID, Double Dx, Double Dy, Double Dz,bool onGround);
@ -141,7 +144,10 @@ namespace MinecraftClient.Protocol
void OnEntityTeleport(int EntityID, Double X, Double Y, Double Z, bool onGround);
void OnWindowItems(int type, Dictionary<int, Item> itemList);
void OnWindowItems(int type, Dictionary<int, MinecraftClient.Inventory.Item> itemList);
void OnSetSlot(byte WindowID, short SlotID, bool Present);
void OnSetSlot(byte WindowID, short SlotID, bool Present, int ItemID, byte Count, Dictionary<string, object> NBT);
void SetPlayerEntityID(int EntityID);
}