Exemplo n.º 1
0
        private void HandleMcpeContainerClose(McpeContainerClose message)
        {
            if (_openInventory == null)
            {
                return;
            }

            // unsubscribe to inventory changes
            _openInventory.InventoryChange -= OnInventoryChange;

            // close container
            if (_openInventory.Type == 0)
            {
                SendPackage(
                    new McpeTileEvent()
                {
                    x     = _openInventory.Coordinates.X,
                    y     = _openInventory.Coordinates.Y,
                    z     = _openInventory.Coordinates.Z,
                    case1 = 1,
                    case2 = 0,
                });
            }

            // active inventory set to null
            _openInventory = null;
        }
Exemplo n.º 2
0
 public void HandleMcpeContainerClose(McpeContainerClose message)
 {
 }
Exemplo n.º 3
0
 public override void HandleMcpeContainerClose(McpeContainerClose message)
 {
     OpenMenu = null;
     base.HandleMcpeContainerClose(message);
 }
Exemplo n.º 4
0
		protected virtual void HandleMcpeContainerClose(McpeContainerClose message)
		{
			lock (_inventorySync)
			{
				var inventory = _openInventory;
				_openInventory = null;

				if (inventory == null) return;

				// unsubscribe to inventory changes
				inventory.InventoryChange -= OnInventoryChange;

				if (message != null && message.windowId != inventory.WindowsId) return;

				// close container 
				if (inventory.Type == 0 && !inventory.IsOpen())
				{
					var tileEvent = McpeTileEvent.CreateObject();
					tileEvent.x = inventory.Coordinates.X;
					tileEvent.y = inventory.Coordinates.Y;
					tileEvent.z = inventory.Coordinates.Z;
					tileEvent.case1 = 1;
					tileEvent.case2 = 0;
					Level.RelayBroadcast(tileEvent);
				}
			}
		}
 public abstract void HandleMcpeContainerClose(McpeContainerClose message);
Exemplo n.º 6
0
 public override void HandleMcpeContainerClose(McpeContainerClose message)
 {
 }
Exemplo n.º 7
0
        protected virtual void HandleMcpeContainerClose(McpeContainerClose message)
        {
            if (_openInventory == null) return;

            // unsubscribe to inventory changes
            _openInventory.InventoryChange -= OnInventoryChange;

            // close container
            if (_openInventory.Type == 0)
            {
                SendPackage(
                    new McpeTileEvent()
                    {
                        x = _openInventory.Coordinates.X,
                        y = _openInventory.Coordinates.Y,
                        z = _openInventory.Coordinates.Z,
                        case1 = 1,
                        case2 = 0,
                    });
            }

            // active inventory set to null
            _openInventory = null;
        }
 public void HandleMcpeContainerClose(McpeContainerClose message)
 {
     WritePackage(message);
 }
Exemplo n.º 9
0
 public override void HandleMcpeContainerClose(McpeContainerClose message)
 {
     UnhandledPackage(message);
 }
Exemplo n.º 10
0
 public void HandleMcpeContainerClose(McpeContainerClose message)
 {
 }