Ejemplo n.º 1
0
 public ReleaseItemData(InventoryTransactionPacket pk)
 {
     this.ActionType   = (int)pk.ReadUVarInt();
     this.HotbarSlot   = pk.ReadSVarInt();
     this.MainHandItem = pk.ReadItem();
     this.HeadRot      = pk.ReadVector3();
 }
Ejemplo n.º 2
0
 public UseItemOnEntityData(InventoryTransactionPacket pk)
 {
     this.EntityRuntimeId = pk.ReadEntityRuntimeId();
     this.ActionType      = (int)pk.ReadUVarInt();
     this.HotbarSlot      = pk.ReadSVarInt();
     this.ItemMainHand    = pk.ReadItem();
     this.PlayerPos       = pk.ReadVector3();
     this.ClickPos        = pk.ReadVector3();
 }
Ejemplo n.º 3
0
 public UseItemData(InventoryTransactionPacket pk)
 {
     this.ActionType   = (int)pk.ReadUVarInt();
     this.BlockPos     = (Vector3i)pk.ReadBlockVector3();
     this.Face         = pk.ReadBlockFace();
     this.HotbarSlot   = pk.ReadSVarInt();
     this.ItemMainHand = pk.ReadItem();
     this.PlayerPos    = pk.ReadVector3();
     this.ClickPos     = pk.ReadVector3();
 }
Ejemplo n.º 4
0
        public NetworkInventoryAction(InventoryTransactionPacket pk)
        {
            this.SourceType = (int)pk.ReadUVarInt();

            if (this.SourceType == NetworkInventoryAction.SOURCE_CONTAINER)
            {
                this.WindowId = pk.ReadSVarInt();
            }
            else if (this.SourceType == NetworkInventoryAction.SOURCE_WORLD)
            {
                this.Unknown = pk.ReadUVarInt();
            }
            else if (this.SourceType == NetworkInventoryAction.SOURCE_CREATIVE)
            {
            }
            else if (this.SourceType == NetworkInventoryAction.SOURCE_CRAFT_SLOT || this.SourceType == NetworkInventoryAction.SOURCE_TODO)
            {
                this.WindowId = pk.ReadSVarInt();
            }

            this.InventorySlot = (int)pk.ReadUVarInt();
            this.OldItem       = pk.ReadItem();
            this.NewItem       = pk.ReadItem();
        }